I have data in Prometheus for version numbers, but it’s broken into major, minor, revision and build separately – so for example in Grafana I can use:
myapp_majorversion{host="${hostname}"}
This will display the major version as you’d expect, so for example “3”.
What I want it to do is display the full version in one stat, so “3.0.0.1” for example.
The data is there, I can display each in a separate stat, and I can do useless things like add the numbers together with:
(myapp_majorversion{host="${hostname}"})+(myapp_minorversion{host="${hostname}"})
I don’t want to ADD the values, I want to combine them (with a separator) into a string I guess, or at least into a variable type that can display a version.
Is there a way to do this?
Or is there a way to send the data to Prometheus in the correct format in the first place? If I send version numbers with multiple ‘.’ using Telegraf then it fails, it only seems to accept numerical data with a single ‘.’ unless I’m missing something?
Thanks!