Closed mkalcok closed 8 months ago
I can confirm this. There is no info about the custom module name in the relation data.
- relation-id: 43
endpoint: metrics-endpoint
related-endpoint: self-metrics-endpoint
application-data:
alert_rules: '{"groups": [{"name": "cos_1e96fd62_blackbox-exporter_blackbox-exporter-self-monitoring_alerts",
"rules": [{"alert": "BlackboxExporterUnitIsUnavailable", "expr": "up{} < 1",
"for": "0m", "labels": {"severity": "critical", "juju_model": "cos", "juju_model_uuid":
"1e96fd62-8236-46ef-899e-c73471bd6705", "juju_application": "blackbox-exporter",
"juju_charm": "blackbox-exporter-k8s"}, "annotations": {"summary": "Blackbox
Exporter unit {{ $labels.juju_model }}/{{ $labels.juju_unit }} unavailable",
"description": "The Blackbox Exporter unit {{ $labels.juju_model }} {{ $labels.juju_unit
}} is unavailable LABELS = {{ $labels }}\n"}}, {"alert": "BlackboxExporterUnitIsDown",
"expr": "avg_over_time(up{}[1m]) < 0.5", "for": "0m", "labels": {"severity":
"critical", "juju_model": "cos", "juju_model_uuid": "1e96fd62-8236-46ef-899e-c73471bd6705",
"juju_application": "blackbox-exporter", "juju_charm": "blackbox-exporter-k8s"},
"annotations": {"summary": "Blackbox Exporter unit {{ $labels.juju_model }}/{{
$labels.juju_unit }} has been unreachable at least 50% of the time over the
last minute", "description": "The Blackbox Exporter unit {{ $labels.juju_model
}} {{ $labels.juju_unit }} has been unreachable at least 50% of the time over
the last minute LABELS = {{ $labels }}\n"}}]}, {"name": "cos_1e96fd62_blackbox-exporter_blackbox_missing_alerts",
"rules": [{"alert": "BlackboxJobMissing", "expr": "absent(up{})", "for": "0m",
"labels": {"severity": "warning", "juju_model": "cos", "juju_model_uuid":
"1e96fd62-8236-46ef-899e-c73471bd6705", "juju_application": "blackbox-exporter",
"juju_charm": "blackbox-exporter-k8s"}, "annotations": {"summary": "Blackbox
job missing (instance {{ $labels.instance }})", "description": "A Blackbox
job has disappeared\nVALUE = {{ $value }}\nLABELS = {{ $labels }}\n"}}]}]}'
scrape_jobs: '[{"metrics_path": "/metrics", "static_configs": [{"targets": ["blackbox-exporter-0.blackbox-exporter-endpoints.cos.svc.cluster.local:9115"]}]},
{"metrics_path": "/probe", "static_configs": [{"targets": ["http://ubuntu.com",
"https://ubuntu.com", "https://releases.ubuntu.com", "https://non-existent.canonical.com/",
"https://192.168.151.105:16443"]}], "job_name": "blackbox_k8s_endpoints",
"relabel_configs": [{"source_labels": ["__address__"], "target_label": "__param_target"},
{"source_labels": ["__param_target"], "target_label": "instance"}, {"source_labels":
["__param_target"], "target_label": "probe_target"}, {"target_label": "__address__",
"replacement": "blackbox-exporter-0.blackbox-exporter-endpoints.cos.svc.cluster.local:9115"}]}]'
scrape_metadata: '{"model": "cos", "model_uuid": "1e96fd62-8236-46ef-899e-c73471bd6705",
"application": "blackbox-exporter", "unit": "blackbox-exporter/0", "charm_name":
"blackbox-exporter-k8s"}'
related-units:
blackbox-exporter/0:
in-scope: true
data:
egress-subnets: 10.152.183.122/32
ingress-address: 10.152.183.122
private-address: 10.152.183.122
prometheus_scrape_unit_address: 10.1.63.27
prometheus_scrape_unit_name: blackbox-exporter/0
provider-id: prometheus-0
address: 10.1.63.24
Cannot reproduce with the latest charm revision; the scrape job now correctly contains a new module https_2xx_new
I used to try to reproduce the issue:
params:
module:
- https_2xx_new
Closing!
Bug Description
module
parameter does not seem to be properly passed to the Prometheus when scrape job is created.To Reproduce
config.yaml:
probes.yaml:
Environment
juju snap: 3.2.3 juju controller: 3.2.2 blackbox-exporter-k8s char: rev. 2 prometheus char: rev. 103
Relevant log output
Additional context
As can be seen in the Prometheus' job configuration,
module
parameter was not configured. Correct configuration should contain