Bug #55595
closedcephadm: prometheus: The generatorURL in alerts is only using hostname
0%
Description
Prometheus is currently using only the hostname in the 'generatorURL' of an alert which causes issues when clicking on the URL in the Ceph Dashboard or somewhere else, because in most cases the hostname of the node that is running the Prometheus container is not resolvable.
The base of the generatorURL is build here: https://github.com/prometheus/prometheus/blob/main/cmd/prometheus/main.go#L1222
To fix that the command line argument '--web.external-url' must be appended in the systemd unit file of the Prometheus container, e.g. '--web.external-url http://foo.bar:9095' whereas a FQDN hostname is used.
After that Prometheus will generate alerts with a 'generatorURL' property that contains an URL that should be resolvable.
References:
- https://github.com/prometheus/prometheus/blob/main/cmd/prometheus/main.go#L237
- https://github.com/prometheus/prometheus/blob/main/cmd/prometheus/main.go#L249
- https://github.com/prometheus/prometheus/blob/main/cmd/prometheus/main.go#L427
- https://github.com/prometheus/prometheus/blob/main/cmd/prometheus/main.go#L1267
Updated by Volker Theile almost 2 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 46218
Updated by Volker Theile almost 2 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Volker Theile almost 2 years ago
- Status changed from Pending Backport to Resolved
Updated by Volker Theile almost 2 years ago
- Status changed from Resolved to Pending Backport
Updated by Volker Theile almost 2 years ago
- Status changed from Pending Backport to Resolved
Updated by Volker Theile almost 2 years ago
- Status changed from Resolved to Pending Backport
Updated by Volker Theile almost 2 years ago
Backports
Pacific: https://github.com/ceph/ceph/pull/46352
Quincy: https://github.com/ceph/ceph/pull/46353
Updated by Volker Theile almost 2 years ago
- Status changed from Pending Backport to Resolved