-
What Grafana version and what operating system are you using?
10.2.0 -
What are you trying to achieve?
I am trying to create a table with the results of two tcp_connects probes on two different ports via two blackbox jobs. At the moment it looks like this
and I would want it to look like this
- How are you trying to achieve it?
I have two blackbox jobs, one for each port being probed. I tried to add two queries in the table panel, but I cannot combine them somehow. I get the output from the first pic, no matter what transformations I tried(mainly filter by name). There must be something I am missing, maybe an additional variable to be set?
probe_success{target=~“$target”, job=“blackbox_234”}
probe_success{target=~“$target”, job=“blackbox_456”}
as variable i’ve set:
target =label_values(probe_success,target) - this is from an older dashboard 14928, but I am trying to make it suit my needs. I am on a monkey see, monkey do basis at the moment so please be patient
-
Can you copy/paste the configuration(s) that you are having problems with?
- job_name: blackbox_234
metrics_path: /probe
params:
module: [tcp_connect]
file_sd_configs: - files:
- /etc/prometheus/targets.yaml
relabel_configs: - source_labels: [address]
target_label: __param_target - source_labels: [__param_target]
target_label: target - source_labels: [__param_target]
regex: ([^:]+)(?::\d+)?
replacement: ‘$1’
target_label: host - target_label: address
replacement: blackbox_host:9115
- /etc/prometheus/targets.yaml
- job_name: blackbox_234
- job_name: blackbox_456
metrics_path: /probe
params:
module: [tcp_connect]
file_sd_configs:- files:
- /etc/prometheus/targets_456.yaml
relabel_configs: - source_labels: [address]
target_label: __param_target - source_labels: [__param_target]
target_label: target - source_labels: [__param_target]
regex: ([^:]+)(?::\d+)?
replacement: ‘$1’
target_label: host - target_label: address
replacement: blackbox_host:9115
- /etc/prometheus/targets_456.yaml
- files:
Any help will be greatly appreciated, as I am stuck for a couple of days now.