const (
// DefMaxAge is the default duration for which observations stay
// relevant.
DefMaxAge time.Duration = 10 * time.Minute
// DefAgeBuckets is the default number of buckets used to calculate the
// age of observations.
DefAgeBuckets = 5
// DefBufCap is the standard buffer size for collecting Summary observations.
DefBufCap = 500
)I am affraid im exposing some old "ghost" metrics that are never ever updated anymore. (im checking landingpages, i have metrics like
fpc_status{page="www.google.com"} 200
fpc_loads_within_limit{page="www.google.com"} 1
fpc_load_time{page="www.google.com"} 0,2
but in half an hour i might get an updated list of pages , and www.google.com is no longer among them. Then the metrics are "dead" they have a value when they were relevant, but not anymore. Such metrics will never ever get another update.
Is the default behaviour of golang prom client taking care of purging these dead metrics after a while? Is there a variable to set that expiry?
I know that in principle i should construct the metrics in such a way that they are always relevant, well-behaving and non-disappearing... but im lacking a good idea how to organize it.
On Tuesday, December 5, 2017 at 12:05:34 PM UTC+1, Brian Brazil wrote:On 5 December 2017 at 10:27, Maciek Strzelecki <strzelec...@gmail.com> wrote:I have a custom exporter builtusing the golang prom client.
I want to ensure that metrics that were scraped more than X minutes ago will be removed and not exporterd by the exporter. Which setting controls that behaviour?i found this on https://godoc.org/github.com/kandoo/beehive/Godeps/_workspace/src/github.com/prometheus/client_golang/prometheus:const ( // DefMaxAge is the default duration for which observations stay // relevant. DefMaxAge time.Duration = 10 * time.Minute // DefAgeBuckets is the default number of buckets used to calculate the // age of observations. DefAgeBuckets = 5 // DefBufCap is the standard buffer size for collecting Summary observations. DefBufCap = 500 )
Are these the droids i am looking for?No, those are for Summary. Why do you want old metrics removed?--Brian Brazil
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d9d8a075-3c93-4d3e-b4d0-68b80ab16b78%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d9d8a075-3c93-4d3e-b4d0-68b80ab16b78%40googlegroups.com.
The reason i turned away from blackbox exporter was the configuration scheme. It was forcing me to specify targets within prometheus.yaml config file. *If* prometheus had a conf.d-like dir where snippets for additional jobs could be dropped, that would be perfect.
In theory i could leverage the saltstack reactor system to poll whether the external page-list config file was changed, then rerun the prometheus state thus rendering the joint, updated configuration....
But doing a dedicated configurable exporter proved to be more reliable approach.
:-)
Back to my original question - is there a way to set that kind of expiry?
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2c86ac5a-4357-4e29-80f6-741fc0433afb%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2c86ac5a-4357-4e29-80f6-741fc0433afb%40googlegroups.com.