I am trying to check service running on port 9001/healthcheck on each of my ec2 instances in the account and want to validate it using blackbox_exporter in prometheus. For this I created this prometheus.yml:
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_9001_healthcheck]
ec2_sd_configs:
- region: eu-central-1
port: 9001
filters:
- name: "tag:Account"
values:
- abc
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: localhost:9115
This is my blackbox.yml:
modules:
http_9001_healthcheckk:
prober: http
timeout: 15s
http:
method: GET
valid_http_versions:
- HTTP/1.1
- HTTP/2.0
fail_if_not_ssl: false
valid_status_codes: [200]
no_follow_redirects: false
ip_protocol_fallback: false
preferred_ip_protocol: ip4
This is checking application on 9001 only. How I can add /healthcheck as well in this?