How add a label value on Grafana title or Y-axis?

Viewed 142

I use Prometheus + snmp_exporter + grafana to monitor a device , and set $hrStorageIndex as repeat to draw each storage used.

How can add $hrStorageDescr in each pannel title or Y-axis ?

snmp_exporter data as follows :

HELP hrStorageAllocationUnits The size, in bytes, of the data objects allocated from this pool - 1.3.6.1.2.1.25.2.3.1.4
TYPE hrStorageAllocationUnits gauge
hrStorageAllocationUnits{hrStorageIndex="1"} 1024  
hrStorageAllocationUnits{hrStorageIndex="10"} 1024  
hrStorageAllocationUnits{hrStorageIndex="3"} 1024  
hrStorageAllocationUnits{hrStorageIndex="31"} 1024  
hrStorageAllocationUnits{hrStorageIndex="32"} 4096  
hrStorageAllocationUnits{hrStorageIndex="33"} 1024  
hrStorageAllocationUnits{hrStorageIndex="34"} 4096  
hrStorageAllocationUnits{hrStorageIndex="6"} 1024  
hrStorageAllocationUnits{hrStorageIndex="7"} 1024  
hrStorageAllocationUnits{hrStorageIndex="8"} 1024  
HELP hrStorageDescr A description of the type and instance of the storage described by this entry. - 1.3.6.1.2.1.25.2.3.1.3
TYPE hrStorageDescr gauge
hrStorageDescr{hrStorageDescr="/",hrStorageIndex="31"} 1
hrStorageDescr{hrStorageDescr="/etc/log",hrStorageIndex="34"} 1
hrStorageDescr{hrStorageDescr="/etc/mnt",hrStorageIndex="33"} 1
hrStorageDescr{hrStorageDescr="/sys/fs/cgroup/cpuset",hrStorageIndex="32"} 1
hrStorageDescr{hrStorageDescr="Cached memory",hrStorageIndex="7"} 1
hrStorageDescr{hrStorageDescr="Memory buffers",hrStorageIndex="6"} 1
hrStorageDescr{hrStorageDescr="Physical memory",hrStorageIndex="1"} 1
hrStorageDescr{hrStorageDescr="Shared memory",hrStorageIndex="8"} 1
hrStorageDescr{hrStorageDescr="Swap space",hrStorageIndex="10"} 1
hrStorageDescr{hrStorageDescr="Virtual memory",hrStorageIndex="3"} 1
HELP hrStorageIndex A unique value for each logical storage area contained by the host. - 1.3.6.1.2.1.25.2.3.1.1
TYPE hrStorageIndex gauge
hrStorageIndex{hrStorageIndex="1"} 1
hrStorageIndex{hrStorageIndex="10"} 10
hrStorageIndex{hrStorageIndex="3"} 3
hrStorageIndex{hrStorageIndex="31"} 31
hrStorageIndex{hrStorageIndex="32"} 32
hrStorageIndex{hrStorageIndex="33"} 33
hrStorageIndex{hrStorageIndex="34"} 34
hrStorageIndex{hrStorageIndex="6"} 6
hrStorageIndex{hrStorageIndex="7"} 7
hrStorageIndex{hrStorageIndex="8"} 8
HELP hrStorageSize The size of the storage represented by this entry, in units of hrStorageAllocationUnits - 1.3.6.1.2.1.25.2.3.1.5
TYPE hrStorageSize gauge
hrStorageSize{hrStorageIndex="1"} 947676  
hrStorageSize{hrStorageIndex="10"} 0  
hrStorageSize{hrStorageIndex="3"} 947676  
hrStorageSize{hrStorageIndex="31"} 115157  
hrStorageSize{hrStorageIndex="32"} 0  
hrStorageSize{hrStorageIndex="33"} 45478  
hrStorageSize{hrStorageIndex="34"} 3.746398e+06  
hrStorageSize{hrStorageIndex="6"} 947676  
hrStorageSize{hrStorageIndex="7"} 177976  
hrStorageSize{hrStorageIndex="8"} 10836  
HELP hrStorageType The type of storage represented by this entry. - 1.3.6.1.2.1.25.2.3.1.2
TYPE hrStorageType gauge
hrStorageType{hrStorageIndex="1",hrStorageType="1.3.6.1.2.1.25.2.1.2"} 1  
hrStorageType{hrStorageIndex="10",hrStorageType="1.3.6.1.2.1.25.2.1.3"} 1  
hrStorageType{hrStorageIndex="3",hrStorageType="1.3.6.1.2.1.25.2.1.3"} 1  
hrStorageType{hrStorageIndex="31",hrStorageType="1.3.6.1.2.1.25.2.1.4"} 1  
hrStorageType{hrStorageIndex="32",hrStorageType="1.3.6.1.2.1.25.2.1.4"} 1  
hrStorageType{hrStorageIndex="33",hrStorageType="1.3.6.1.2.1.25.2.1.4"} 1  
hrStorageType{hrStorageIndex="34",hrStorageType="1.3.6.1.2.1.25.2.1.4"} 1  
hrStorageType{hrStorageIndex="6",hrStorageType="1.3.6.1.2.1.25.2.1.1"} 1  
hrStorageType{hrStorageIndex="7",hrStorageType="1.3.6.1.2.1.25.2.1.1"} 1  
hrStorageType{hrStorageIndex="8",hrStorageType="1.3.6.1.2.1.25.2.1.1"} 1  
HELP hrStorageUsed The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits. - 1.3.6.1.2.1.25.2.3.1.6
TYPE hrStorageUsed gauge
hrStorageUsed{hrStorageIndex="1"} 803248  
hrStorageUsed{hrStorageIndex="10"} 0  
hrStorageUsed{hrStorageIndex="3"} 803248  
hrStorageUsed{hrStorageIndex="31"} 57812  
hrStorageUsed{hrStorageIndex="32"} 0  
hrStorageUsed{hrStorageIndex="33"} 2172  
hrStorageUsed{hrStorageIndex="34"} 2.825416e+06  
hrStorageUsed{hrStorageIndex="6"} 69612  
hrStorageUsed{hrStorageIndex="7"} 177976  
hrStorageUsed{hrStorageIndex="8"} 10836  
0 Answers
Related