Code Monkey home page Code Monkey logo

Comments (18)

gianrubio avatar gianrubio commented on May 18, 2024 3

@hnlq715, could you explain why this will break the design?

from nginx-module-vts.

vozlt avatar vozlt commented on May 18, 2024 3

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.

gianrubio avatar gianrubio commented on May 18, 2024 2

@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.

screen shot 2016-12-21 at 15 21 42

kubernetes/ingress-nginx#72

@hnlq715 what do you think?

from nginx-module-vts.

sysulq avatar sysulq commented on May 18, 2024 1

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.

vozlt avatar vozlt commented on May 18, 2024

Hi, Thanks for your suggestion.
I'll get it checked soon.

from nginx-module-vts.

vozlt avatar vozlt commented on May 18, 2024

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:
nginx-vts-exporter

from nginx-module-vts.

gianrubio avatar gianrubio commented on May 18, 2024

@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.

vozlt avatar vozlt commented on May 18, 2024

@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.

sysulq avatar sysulq commented on May 18, 2024

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.

pavelnemirovsky avatar pavelnemirovsky commented on May 18, 2024

Guys did u merge this PR to master?

from nginx-module-vts.

trnl avatar trnl commented on May 18, 2024

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.

sysulq avatar sysulq commented on May 18, 2024

@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.

trnl avatar trnl commented on May 18, 2024

@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.

sysulq avatar sysulq commented on May 18, 2024

@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.

trnl avatar trnl commented on May 18, 2024

@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.

 avatar commented on May 18, 2024

#114

from nginx-module-vts.

vozlt avatar vozlt commented on May 18, 2024

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.

hadret avatar hadret commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.