Comments (18)
@hnlq715, could you explain why this will break the design?
from nginx-module-vts.
That feature has added.
All mertric names are started with nginx_vts_(*)
.
I can not guarantee that it will work well because I know little about prometheus.
Please test it.
Thanks.
Latest commit: 2f9434f
from nginx-module-vts.
@vozlt prometheus could be an another format for the stats. It'll be a new endpoint like status/format/prometheus. The kubernetes project are using your module for the nginx ingress controller. I'm really interested to make the prometheus format easy to use for everyone.
It'll be similar to this screenshot.
@hnlq715 what do you think?
from nginx-module-vts.
Hope this could help you guys, simple lua code generates nginx's prometheus metrics.
https://github.com/hnlq715/nginx-prometheus-metrics
from nginx-module-vts.
Hi, Thanks for your suggestion.
I'll get it checked soon.
from nginx-module-vts.
Hi, the prometheus exporter for nginx-module-vts has been released by hnlq715
in issue #62.
Try to nginx-vts-exporter.
The screenshot nginx_server_connections
as follows:
from nginx-module-vts.
@vozlt I'm already using nginx-vts-exporter to collect prometheus metrics. It's really easy to use.
My question is why not merge the nginx-vts-exporter with this project and have prometheus metrics by default?
from nginx-module-vts.
@gianrubio Thanks for your good suggestion.
I have never used prometheus but I installed it because of this issue.
So I don't know detail about it yet.
But I think that it is better to make it a 3rd-party module like nginx-vts-exporter outside nginx-module-vts to do not affect nginx performance.
from nginx-module-vts.
The requested feature may break the internal design in vozlt/nginx-module-vts. In my oppinion, it's much wiser to start a new project for nginx-prometheus-metrics, or use hnlq715/nginx-vts-exporter instead.
from nginx-module-vts.
Guys did u merge this PR to master?
from nginx-module-vts.
Guys, I also agree that it will not break any designs in nginx-module-vts. Prometheus is just another output similar to existing json, jsonp and html and rendering of it will be a no brainer.
from nginx-module-vts.
@gianrubio sorry to reply your question so lately...
Prometheus in vts should use histogram instead of gauge type for time metrics, not like hnlq715/nginx-vts-exporter, which means a huge change for vts.
Another choice here would be hnlq715/nginx-prometheus-metrics, which use lua embedded in nginx.
from nginx-module-vts.
@hnlq715, I agree that this will be a change for vts, however, I believe histograms are not mandatory for now and simple nginx-vts-exporter style gauge output will be fine. I believe that was an original suggestion by @gianrubio.
from nginx-module-vts.
@trnl @vozlt @gianrubio
I agree, without supporting histogram type, this change would be acceptable.
But it would be great to support histogram for time metrics, and we could achieve this with lua or c module. After all, we could have p90, p95 or p99 request/response time metrics... or even apdex score
from nginx-module-vts.
@hnlq715, actually yes. We rely on that now. However it will be nice to have the same stuff in nginx-ingress-controller for Kubernetes.
from nginx-module-vts.
from nginx-module-vts.
The metric type of histogram in format/prometheus
has added.
See the directive vhost_traffic_status_histogram_buckets for details.
I quickly added the feature and did not test it much.
So it is necessary to verify that I have implemented the function correctly according to prometheus histogram metric type.
Please test it.
Thanks.
Latest commit: 2fd3ae4
from nginx-module-vts.
Overall format/prometheus
appears to work very well. I haven't test the histogram buckets yet, but I noticed some other things missing when it comes to the upstreams
part:
- State of the backend is not provided
- Weight of the backend is not provided
- MaxFails of the backend is not provided
- FailTimeout of the backend is not provided
All of the above are very useful to have and are provided by other formats.
from nginx-module-vts.
Related Issues (20)
- Sorting HOT 1
- Change defoult sorting. HOT 1
- buffer size may be too small HOT 2
- Release a new version HOT 2
- No such file or directoryodule-vts/config: line 2: auto/have HOT 2
- Label metrics with jsonrpc method HOT 16
- the status of server is not current when max_fails = 0 HOT 4
- /status/format/json not served after clean installation HOT 1
- VTS doesn't support query string encoding HOT 1
- I encountered the following Syntax error while compiling the vts source code in windows environment HOT 2
- [emerg] 1#1: module "/etc/nginx/modules/ngx_http_vhost_traffic_status_module.so" version 1022001 instead of 1025002 in /etc/nginx/nginx.conf:5 HOT 1
- periodic cleanup of shared memory? HOT 2
- Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) on VTS HOT 3
- Question - time window of statistics HOT 1
- Module bug HOT 4
- Will the request fail? 'ngx_slab_alloc() failed: no memory in vhost_traffic_status_zone' HOT 1
- 2024 Can this tool support TCP monitor? HOT 1
- shm_add_upstream error HOT 1
- how to disable upstream statistics collection? HOT 4
- bug: absolute URL prevent the use of a reverse proxy with a different path in front of the stats
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-module-vts.