Giter VIP home page Giter VIP logo

Comments (8)

juliusv avatar juliusv commented on June 11, 2024

It crashes in this line:

https://github.com/prometheus/statsd_bridge/blob/master/bridge.go#L217

That probably means that NSQ sends counter increments with negative values (which Prometheus forbids). Can you confirm? Does NSQ internally "reset" its counters by decrementing them by their current value?

I agree the statsd-bridge shouldn't crash in that case, but probably should just ignore negative counter increments.

from statsd_exporter.

ekristen avatar ekristen commented on June 11, 2024

I guess you could say they decrement by their current value, but really they just all reset to 0 upon a restart.

from statsd_exporter.

juliusv avatar juliusv commented on June 11, 2024

The key thing is, they seem to send negative counter increments via the StatsD protocol. I'm not sure how much sense that makes. Usually you don't want a counter reset to be reflected as a negative rate (which I think will happen statsd-wise in this case). You'd just want to ignore it in the rate calculation. In any case, I'm all for simply ignoring negative counter increments in the bridge (while logging a warning about it). Would you be up for sending a PR?

from statsd_exporter.

ekristen avatar ekristen commented on June 11, 2024

This is still a problem

from statsd_exporter.

ekristen avatar ekristen commented on June 11, 2024

@juliusv if nsq restarts its stats reset, it isn't sending negative values, but it does send values that could be less than what it had originally.

from statsd_exporter.

pete0emerson avatar pete0emerson commented on June 11, 2024

This one bit me today as well (we've got a proof of concept prometheus server up, and I just repointed one of our application servers to the statsd_exporter). I don't know golang, but my colleague does, so we'll see if he can patch and issue a PR.

from statsd_exporter.

ekristen avatar ekristen commented on June 11, 2024

That would be awesome.

from statsd_exporter.

sdurrheimer avatar sdurrheimer commented on June 11, 2024

Should this be closed given that #33 has been merged ?

from statsd_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.