I am using this dashboard as a starting point: 13041-website-monitoring
But I would like to have filters on the dashboard so that I can:
- choose group (a defined collection of URLs)
- select the target (URL to display)
In Prometheus, I do have groups of URLs defined in different yml files.
- job_name: "collection 1"
metrics_path" /probe
params:
module: [http_2xx]
file_sd_configs:
- files:
- "/path/to/collection1.yml"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
replacement: https://$1/
- source_labels:[__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115
- job_name: "collection 1"
metrics_path" /probe
params:
module: [icmp]
file_sd_configs:
- files:
- "/path/to/collection1.yml"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
replacement: https://$1/
- source_labels:[__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115
And repeat with other collection_n.yml files
In the collection.yml file:
- targets:
- url1
- url2
- url3
I did manage to create a drop list of jobs in prometheus, but it is not limited to the specific URL collection jobs. And I cannot get my second drop list to only show the URLs applicable to the selected job.
Any suggestions are appreciated, or if there is a better way to accomplish this.
Thanks