Giter VIP home page Giter VIP logo

Comments (10)

grobie avatar grobie commented on June 11, 2024 1

I'm not sure this should be an issue / feature for the statsd exporter. Fixing the application is the right thing to do here. I vote to close this issue until there are multiple users having this need and can't fix their app for some understandable reason.

from statsd_exporter.

matthiasr avatar matthiasr commented on June 11, 2024

@marcosnils would that solve your problem? You could use mapping configuration to coerce these metrics into gauges, even if they're sent as counters. If you want to tackle this, please do, and let me know if you need any pointers.

from statsd_exporter.

marcosnils avatar marcosnils commented on June 11, 2024

@matthiasr I'm not sure if this will solve the problem. As you already know, Gauges are used for values that go up & down. In this particular case, the value will never go down, so I can't image how to graph something like rate(http_total_count[5m]) with a gauge metric.

from statsd_exporter.

matthiasr avatar matthiasr commented on June 11, 2024

Technically, that's true – in practice Prometheus does not enforce types, and you can totally take the rate of a "gauge". The result won't be useful if the gauge ever goes down without resetting to zero, but otherwise that would work.

from statsd_exporter.

marcosnils avatar marcosnils commented on June 11, 2024

Makes sense. I guess this fix could work then. I'll try to give it a shot later today.

from statsd_exporter.

matthiasr avatar matthiasr commented on June 11, 2024

Of course, fixing the source of the incorrect metrics would always be preferrable to any overriding – different from the SNMP case, there's actually a reasonable chance for anything that emits to statsd.

In your case, that could mean emitting the metrics as gauges, or actually emitting the counter deltas as the statsd protocol demands.

from statsd_exporter.

moolen avatar moolen commented on June 11, 2024

@matthiasr / @grobie FTR: I'm running into the very same issue.

We're using statsite. It listens for statsd metrics, spawns a subprocess (the "sink") and writes them to its stdin which then sends the metrics over to graphite aswell as the statsd exporter. This is the statsite ASCII protocol:

key|val|timestamp\n
[...]

As you can see the type information gets lost during the handover to the subprocess. It would be really handy if i'd be able to map the types in the statsd exporter.

from statsd_exporter.

matthiasr avatar matthiasr commented on June 11, 2024

That's … a completely different protocol? Looking at the statsite documentation the sink protocol is distinct from the statsd protocol. The statsd exporter should accept the same input as statsite (since they both stand in for the OG statsd), but the statsite output is different. If you want to emit statsd metrics from statsite, it seems like you need a statsd sink that translates back into the statsd protocol first?

from statsd_exporter.

moolen avatar moolen commented on June 11, 2024

We translate it back to statsd (we've essentially built a split-sink - graphite aswell as statsd-exporter) - without the type information tho. It would be handy to be able to overwrite the types (temporarily) for the migration process.

from statsd_exporter.

matthiasr avatar matthiasr commented on June 11, 2024

In that case I would suggest you restore the types in your sink? Given statsite/statsd already pre-aggregates events, these are all gauges anyway?

If it's for a migration, I would not sweat over types too much. There is little practical difference between the counter, gauge, and untyped metric types – and summary/histogram only really work if you are sending raw events to the exporter.

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.