-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support prometheus metrics with nginx-module-vts #62
Comments
Thank you for publishing your code. 👍 |
sure 😄 |
Lemme hijack this issue.. @vozlt With prometheus become the defactor standard of metrics exposition, would you be open to add prometheus metrics natively? It's a simple text based format and it wouldn't require users to somehow 'translate' it by using either @hnlq715 exporter or Kubernetes ingress controller which does the same: https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/customization/custom-vts-metrics-prometheus/README.md |
This appears to be a dupe of #58. |
Hope this could help you guys, simple lua code generates nginx's prometheus metrics. |
That feature has added. Latest commit: 2f9434f |
@vozlt I've tested this and it seems pretty good. It seems to make https://github.com/hnlq715/nginx-vts-exporter entirely unnecessary. It compared both and replaced just the metric names and it was basically a drop-in replacement. Only some connection states in Now, for the future, request times sorted into histogram buckets or percentiles would be great. |
nice job,maybe i should encouter this feature in nginx-vts-exporter project |
@towolf Looks good. The connections graph doesn't seem far off, I'm guessing it's a difference of polling jitter. What scrape interval are you using there? Maybe try speeding it up to something like 5-10s to get higher resolution on the gauge. Gauges are inherently sensitive to polling jitter. It would be useful to have some counters, like I sent a couple of PRs to do some best practices cleanup, but otherwise this looks pretty good. |
But basically the vts module would have to observe the duration of each request and add it to the right bucket. Pre-sampled averages and cut-off samples like exposed right now are unfortunately not enough to get any meaningful averages (see sysulq/nginx-vts-exporter#43 (comment)) |
@discordianfish I will check out the histogram of prometheus soon. |
The metric type of histogram in Latest commit: 2fd3ae4 |
Tested this again, and from what I can see at first glance, this works as it should. Grafana can directly present histogram data as is as a heatmap. And Prometheus can transform histogram buckets into percentiles using this approximative function. I only have sparse data at the moment: Pretty great, thanks. |
This is great, I'll test it and report back! |
@towolf Would you please share your grafana dashboard?
|
@yangboyd sure, here you go But this dashboard is pretty specific for our old Kubernetes ingress setup, which at the time was a stand-alone thing. But you can check it out, if you want. |
Recently I came across prometheus, and I tried to implement prometheus metrics with nginx-module-vts.
Here is nginx-vts-exporter, which is heavily used in our system.
Hope this can be helpful, and any questions would be pleasure 😆
The text was updated successfully, but these errors were encountered: