-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd.go: Added systemd health metric #113
base: main
Are you sure you want to change the base?
Conversation
Hm~ I understand that you might prefer to still serve The disadvantage of not just stopping to serve that I see is that this approach requires awareness from everyone who writes alerts based on this exporter, because apart from the standard alert on Thoughts? |
Fixes: prometheus-community#112 Signed-off-by: Jonathan Davies <[email protected]>
To me, a 5xx error would mean that someone made a serious programming error.
This is just a fact of life when it comes to different exporters exposing different metrics and the vast majority use their name as a prefix, I can see |
} | ||
|
||
ch <- prometheus.MustNewConstMetric(c.scrapeDurationDesc, prometheus.GaugeValue, time.Since(begin).Seconds(), namespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense to me, as it's not actually exposing metrics per collector that I can tell. namespace
is always systemd
, so the label would always be collector="systmed"
.
This means it's no different than up
and scrape_duration_seconds
recorded by Prometheus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't have collectors up until this point - will fix that in a bit.
The standard for Prometheus is to return a 5xx error for failed scraps. Some exporters do what you're proposing here, but in general it's not encouraged to do this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a rebase with the change to the new logging library.
Fixes: #112