On Saturday, 11 February 2023 at 10:02:29 UTC Christoph Anton Mitterer
wrote:
But what one actually wants from such checks is additional (typically
purely textual) information, like in the above example which HDD
(enclosure, bay number,... or the serial number) has failed.
Typically you'd have one metric for each unit (e.g. physical disk) with its
status, something along the lines of:
node_pd_failed{device="/dev/hda",serial="ABC123"} 0
node_pd_failed{device="/dev/hdb",serial="DEF456"} 1
You can get some realistic examples from node-exporter textfile collector
example scripts: smartmon.py
<https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/smartmon.py>
(for SMART stats) and storcli.py
<https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/storcli.py>
(for megaraid)
Also I have numerous other checks which test for things which are not
really related to a number but where the output are strings.
In that case, prometheus may or may not be a good solution. You can put
the string in a label, but every time it changes it will create a new
timeseries. If the values are stable, and only change occasionally, it may
be good enough. The problems are more that it is difficult to query
timeseries when they appear and disappear over time.
Depending on your use case, "examplars" might work for you: these are blobs
of data which are associated with a timeseries, and are intended to give
*one* detailed example of a piece of information which went into building
that metric. For example, if the metric is a count of HTTP request 502
failures, the exemplar might contain the details of the most recent such
failure. Exemplars are relatively new and I believe are still hidden
behind a feature flag. They are stored in RAM.
Otherwise you might want to look at a log system like loki.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/c29b20ff-fd3a-474a-aea0-5bedab9e5caen%40googlegroups.com.