Hi,
I am currently setting up a Grafana Monitoring for our pfSenses. So far the basics are working fine but I am stuck at the dashboard variable part. I have setup three variables, which I would like to use on my dashboard:
My Infrastructure setup:
srv-a = Grafana + Prometheus
srv-b = pfSense 1 + node_exporter 1
srv-c = pfSense 2 + node_exporter 2
Variable 1
Variable name: host
Variable type: custom
Variable label: Hosts
Variable value: pfSense1_Location : srv-b-IP, pfSense2_Location : srv-c-IP
Variable 2
Variable name: instance
Variable type: query
Variable label:
Variable hide: variable
Data source: Prometheus
Query: label_values(up{job=~"pfsense.*",instance=~".+"}, instance)
Regex: (.+):\d+
Preview shows the IP addresses from both node_exporters
Variable 3
Variable name: port
Variable type: query
Variable label:
Variable hide: variable
Data source: Prometheus
Query: label_values(up{job=~"pfsense.*"}, instance)
Regex: /[^:]+:(.*)/
Preview shows the port from both node_exporters
Variable 1 is the label on the dashboard, where people can select the required location from. I would like to get the IP addresses from variable 2 as values into variable 1, instead of entering these manually. Is there any way I could do this?