Feature: add beat version info
Opened this issue · 6 comments
Feature idea, add beat info metrics from the stats endpoint /
{
"beat": "pubsubbeat",
"hostname": "pubsub-sidekiq-inf-gstg",
"name": "pubsub-sidekiq-inf-gstg",
"uuid": "FOO",
"version": "7.5.1"
}
Would make a metrics like this:
pubsubbeat_build_info{version="7.5.1"} 1
pubsubbeat_beat_info{beat_name="pubsub-sidekiq-inf-gstg",uuid="FOO",} 1
beat version available in beat_exporter_target_info{beat="auditbeat",uri="localhost:",version="7.5.1"}
adding UUID is tricky, as it's random value and could cause cardinality explosion? not sure how under the good UUID is generated
Oh, strange, I checked for info metrics previously and didn't see it.
It seems like the UUID is stored in a meta.json written out by the beat. Should be stable enough to expose.
I understand name
and hostname
, but does UUID really have value to be exposed?
Yes, there really is a UUID, at least on my instances. Having the UUID isn't that important to me, it was just an idea.
Weird, it seems like beat_exporter_target_info
is not read at every scrape. I did some upgrade testing today and I saw no change in the version.
That data read only once on beat-exporter startup, so if you changed *beat without restarting actual exporter - could be u see stale data.
Ok, I will see about fixing the exporter to update at every scrape.