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.
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.
{
"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}'