*I'd like to track firmware versions for a large fleet of hardware devices and wondering if Prometheus is suitable for this task. The data comes from a json API, as shown in the example below, where the firmware version is "1.7.8". (I've redacted extra information to make a minimal working example.)*
*I set this up as a module in json-exporter with firmwareVersion as a label; the problem is it creates a new time series every time a firmware version is updated.* That's all fine: a small amount of metric churn on each firmware update is not a problem. Conventionally such a metric would have a static value of 1, which makes it easier to use in join queries, but using its value for upTime as well shouldn't be a problem. Here's some background documentation for this way of working: https://www.robustperception.io/how-to-have-labels-for-machine-roles https://www.robustperception.io/exposing-the-software-version-to-prometheus https://www.robustperception.io/left-joins-in-promql https://prometheus.io/docs/prometheus/latest/querying/operators/#many-to-one-and-one-to-many-vector-matches Metrics like node_uname_info and node_os_info work this way. *I'd like to visualize this in Grafana with a state timeline where the X axis is a stack of each device by name, the Y axis is time, and each bar shows the firmware version string.* That is a Grafana question rather than a Prometheus question, so is probably best asked on community.grafana.com. I can tell you that I did set this up on a system to display state changes of drives in MegaRAID arrays from prometheus labels, and it worked fine. It had horizontal bars, with time on the X axis and the drive name and drive ID+state on the Y axis. I'm afraid that since I no longer have access to that system, I can't give you its exact config. Googling turns up https://stackoverflow.com/questions/68887416/grafana-state-timeline-panel-with-values-states-supplied-by-label but that looks more complicated than I thought I had done. On Saturday, 14 October 2023 at 01:06:05 UTC+1 Elliott Balsley wrote: > I'd like to track firmware versions for a large fleet of hardware devices > and wondering if Prometheus is suitable for this task. The data comes from > a json API, as shown in the example below, where the firmware version is > "1.7.8". (I've redacted extra information to make a minimal working > example.) > > I set this up as a module in json-exporter with firmwareVersion as a > label; the problem is it creates a new time series every time a firmware > version is updated. I'd like to visualize this in Grafana with a *state > timeline* where the X axis is a stack of each device by name, the Y axis > is time, and each bar shows the firmware version string. > > [image: image.png] > > This is the closest I have come using Grafana transformations, this looks > good except it only works for a single device, because I've lost the device > name label. > [image: image.png] > > *{* > > *"general"**: {* > > *"schemaVersion"**: *"1"*,* > > *"environment"**: *"production"*,* > > *"deviceName"**: *"RA32S-703752"*,* > > *"firmwareVersion"**: *"1.7.8"*,* > > *"https"**: *false > > * },* > > *"debug"**: {* > > *"uptime"**: *225 > > * }* > > *}* > > modules: > roomalert: > metrics: > - name: uptime > path: '{.debug.uptime}' > valuetype: counter > labels: > firmwareVersion: '{.general.firmwareVersion}' > serial: '{.general.serialNumber}' > -- 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/e785f63b-74bd-4c28-a0b3-06f491ecbc33n%40googlegroups.com.

