Closed coding-brigadier closed 5 years ago
How about adding new aggregation=gauge with rules:
I agree with adding something like aggregation=gauge
, but keep ngx.graphite
as a way to increment and have an API to retrieve the current value. This way we'd have better abstraction.
Try v2.4
graphite_param name=my_gauge aggregate=gauge;
ngx.graphite("my_gauge", 1)
ngx.graphite("my_gauge", -1)
local value = ngx.graphite.get("my_gauge")
ngx.graphite.set("my_gauge", 10)
Can you give me a quick overview on how the gauge value gets emitted if there is no interval? Or is the idea to use the gauge
as a buffer from which we can grab and append it to the other aggr?
First the parameter value is 0. With the ngx.graphite, you can send a delta to which the value will change. And this value will be stored all the time the server is running. You can only change the value of the parameters with agr = gauge
Hi.
I ran into a problem where I am trying to collect a number of concurrent requests by emitting some
1
s and-1
s as part of a request. However, I run into an issue that the data that gets emitted into Grafana ends up being negative due to the fact that the aggregate value gets reset.Without going too much into detail into the problem, is there a way I can access the current value that is set by
ngx.graphite()
function?