Combining multiple Prometheus queries in a Grafana dashboard

Viewed 18

I have metrics that represent k8s cluster versions based on semver and generate the following:

cluster_major_version{Name="cluster-1"} 1
cluster_major_version{Name="cluster-2"} 1

cluster_minor_version{Name="cluster-1"} 22
cluster_minor_version{Name="cluster-2"} 24

cluster_patch_version{Name="cluster-1"} 13
cluster_patch_version{Name="cluster-2"} 4

In a Grafana dashboard I can extract major, minor and patch from three separate queries and put them in a table which has the headings:

Cluster | Major | Minor | Patch

However I wish to combine these values so instead of having each metric in a separate column, I have something like

Cluster | Version

Is there a way of doing this?

Thanks,

1 Answers
Related