Newly added targets don't show up without restarting prometheus
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Prometheus2 charm |
Fix Released
|
Critical
|
Unassigned |
Bug Description
This merge added code to use the web hook to reload the configuration file via web hook /-/reload, but the daemon argument --web.enable-
Ultimately, newly related targets don't cause config file reloads, so data doesn't start flowing into prometheus without the operator restarting the service or running kill -HUP on the service.
Recommend adding daemon arg --web.enable-
https:/
The runtime_args code doesn't seem like it would support value-less binary runtime args, however, so this may require a slight refactor.
Related branches
- Jeremy Lounder (community): Approve
- Drew Freiberger: Pending requested
- Jose Guedez: Pending requested
- Alvaro Uria: Pending requested
-
Diff: 117 lines (+31/-16)3 files modifiedsrc/reactive/prometheus.py (+8/-12)
src/tests/functional/tests/tests_prometheus.py (+23/-1)
src/tests/unit/test_reactive_prometheus.py (+0/-3)
- Alvaro Uria (community): Needs Fixing
- Drew Freiberger (community): Approve
- Jose Guedez (community): Approve
-
Diff: 78 lines (+30/-7)2 files modifiedsrc/reactive/prometheus.py (+6/-7)
src/tests/functional/tests/tests_prometheus.py (+24/-0)
Changed in charm-prometheus2: | |
assignee: | nobody → Edin S (exsdev) |
Changed in charm-prometheus2: | |
status: | New → In Progress |
Changed in charm-prometheus2: | |
assignee: | Edin S (exsdev) → Andrea Ieri (aieri) |
status: | In Progress → Fix Committed |
tags: | added: sts |
Changed in charm-prometheus2: | |
status: | Fix Committed → Fix Released |
milestone: | none → 20.10 |
Suggest functional test that adds a new "target" relation and then checks that the new target exists in running prometheus via api endpoint /targets.