Giter VIP home page Giter VIP logo

Comments (4)

stempler avatar stempler commented on July 19, 2024

With what kind of metrics do you see that as a problem? I think that is the normal behavior for Prometheus metrics in general and Prometheus is ready to deal with that.

For example for counter metrics, it is normal that they may reset also without restart (they can't grow infinitely after all). Functions like rate and increase should be used to process counters, looking at the change in a certain time, and they are able to deal with counter resets.

from prometheus-nginxlog-exporter.

voidking avatar voidking commented on July 19, 2024

Thanks for your reply.
Rate and increase are generally not greatly affected, but counter will be greatly affected.
For example, if I want to count the total number of visits in the last hour, day or week, if a reset occurs during this period, then I may get a negative number result.
To be more specific, assuming that the value of nginx_http_response_count_total was 10000 a day ago, and the exporter restarted today, and the value is 1 at this time, then the number of visits I get is -9999.

from prometheus-nginxlog-exporter.

stempler avatar stempler commented on July 19, 2024

Not sure what you want to track here - it should be no problem using increase to for instance get daily request counts (or for some other time frame where metrics are retained).

If you want to have a counter of requests over a time that extends what is stored in Prometheus, then I think Prometheus might not be the right tool or you would at least need to process and store the information somewhere else.

from prometheus-nginxlog-exporter.

voidking avatar voidking commented on July 19, 2024

Not sure what you want to track here - it should be no problem using increase to for instance get daily request counts (or for some other time frame where metrics are retained).

If you want to have a counter of requests over a time that extends what is stored in Prometheus, then I think Prometheus might not be the right tool or you would at least need to process and store the information somewhere else.

Thank u. I made a mistake. When calculating the number of visits over a period of time, it is not simply subtracting, but using functions such as increase and rate.

from prometheus-nginxlog-exporter.

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.