Hi, All!
I use Grafana v.8.5.3.
Datasource - Prometheus/blackbox_exporter.
I have a some groups of hosts and in prometeus blackbox_exporter they look like:
#-------------<Group_1>--------------------
- targets:
- 192.168.25.249
labels:
HOSTgroup: 'Group_1'
HOSTname: 'Host_1_1'
HOSTisp: 'ISP_111'
HOSTaddress: '12345 First-City, Some st., 12'
- targets:
- 192.168.28.1
labels:
HOSTgroup: 'Group_1'
HOSTname: 'Host_1_2'
HOSTisp: 'Telecom Inc'
HOSTaddress: '12354 First-City, Some_2 st., 13'
- targets:
- 192.168.192.65
labels:
HOSTgroup: 'Group_1'
HOSTname: 'Host_1_3'
HOSTisp: 'ISP_111'
HOSTaddress: '12435 First-City, Some_3 st., 1'
#-------------</Group_1>--------------------
#-------------<Group_2>--------------------
- targets:
- 192.168.52.24
labels:
HOSTgroup: 'Group_2'
HOSTname: 'Host_2_1'
HOSTisp: 'ISP_222'
HOSTaddress: '21345 Second-City, Some st., 21'
- targets:
- 192.168.28.1
labels:
HOSTgroup: 'Group_2'
HOSTname: 'Host_2_2'
HOSTisp: 'Inc Telecom'
HOSTaddress: '21354 Second-City, 2_Some st., 331'
- targets:
- 192.168.192.65
labels:
HOSTgroup: 'Group_2'
HOSTname: 'Host_2_3'
HOSTisp: 'ISP_121'
HOSTaddress: '21435 Second-City, Some_3 st., 555'
#-------------</Group_2>--------------------
I want to create templated dashboard to show all hosts in one place:
- each group as a row;
- in each row - multiple SingleStat panels with titles and descriptions from Prometheus labels.
I created a Dashboard Variables from queries to Prometheus:
- hGroup: label_values(up{job="blackbox_exporter"},HOSTgroup); Multi-value: On; Include All option: On
- hName: label_values(up{job="blackbox_exporter",HOSTgroup="$hGroup"},HOSTname); Multi-value: On; Include All option: Off
- hIp: label_values(up{job="blackbox_exporter",HOSTgroup="$hGroup",HOSTname="$hName"},instance); Multi-value: On; Include All option: Off
- hIsp: label_values(up{job="blackbox_exporter",HOSTgroup="$hGroup",HOSTname="$hName"},HOSTisp); Multi-value: On; Include All option: Off
- hAddress: label_values(up{job="blackbox_exporter",HOSTgroup="$hGroup",HOSTname="$hName"},HOSTaddress); Multi-value: On; Include All option: Off
And created Row with:
- Name: ${hGroup}
- Repeat: hGroup
In Row created SingleStat Panel:
- Query: probe_success{HOSTgroup="${hGroup}",HOSTname="${hName}"}
- Title: ${hIp}
- Description: ${hName}\n\n${hIsp}\n\n${hAddress}
- Repeat by: hName
- Max per row: 8
- Display Name: ${hName}
But… I see only rows with one panel in each.
What i do wrong? Or is it impossible?
Help please!
P.S. Sorry for my English.