1
votes

I'm using Grafana+Prometheus+node_exporter to monitor Linux servers. Grafana dashboard (1860) is great.

I want to see cpu model on the dashboard. But node exporter does not have a such metric as model name is not a real metric.

The information exists in node_cpu_info metric. (shown below)

But model_name information is located in the "key" part, not at value part, so when i query this metric i got "1" as result.

So my question is: Is it possible to take only "model_name"=.. part from metrics and show it on the dashboard? (Intel(R) Xeon(R) Gold 6152 CPU @ 2.10GHz)

sample metric:

node_cpu_info{cachesize="30976 KB",core="0",cpu="0",family="6",microcode="0x200002c",model="85",model_name="Intel(R) Xeon(R) Gold 6152 CPU @ 2.10GHz",package="0",stepping="4",vendor="GenuineIntel"} 1

1
It's not clear what you're going to do with it. Do you want to display it on a dashboard? - anemyte
Yes, i want to see the model name like number of cores on the dashboard. Thanks for comment, i'll update the question - Yavuz Sert
Ok, that's easy. Wait a couple minutes, I'll write you an answer. - anemyte

1 Answers

1
votes

You can create a relatively simple table with label values like this one:

label table

  1. Create a new panel, select source, change format from Time series to Table, select Table visualisation, and enable instant mode: enter image description here

  2. Open Transform tab, add two transforms in this order: 1) Labels to fields, 2) Organize fields. See the picture: enter image description here

  3. Disable unnecessary fields and rename ones you'd like to see.