Alertmanager not using custom configuration template
Hi, I'm trying to use a custom template for Alertmanager deployed with Cephadm. Following its documentation[1], I set the option `mgr/cephadm/alertmanager_alertmanager.yml` to my own template, restarted the mgr, and re-deployed Alertmanager. However, Cephadm seems to always use its internal template. After some debugging, I found that the mgr indeed queries for `mgr/cephadm/alertmanager_alertmanager.yml`, but the end template always is the default one. Am I doing something wrong? Is anyone else having this issue? [1] https://docs.ceph.com/en/octopus/cephadm/monitoring/#using-custom-configurat... Regards, -- Marc 'risson' Schmitt CRI - EPITA
Hi Mark, Indeed. I just merged https://github.com/ceph/ceph/pull/39932 which fixes the names of those config keys. Might want to try again (with slashes instead of underscores). Thanks for reporting this, Sebastian Am 10.03.21 um 15:34 schrieb Marc 'risson' Schmitt:
Hi,
I'm trying to use a custom template for Alertmanager deployed with Cephadm. Following its documentation[1], I set the option `mgr/cephadm/alertmanager_alertmanager.yml` to my own template, restarted the mgr, and re-deployed Alertmanager. However, Cephadm seems to always use its internal template.
After some debugging, I found that the mgr indeed queries for `mgr/cephadm/alertmanager_alertmanager.yml`, but the end template always is the default one.
Am I doing something wrong? Is anyone else having this issue?
[1] https://docs.ceph.com/en/octopus/cephadm/monitoring/#using-custom-configurat...
Regards,
-- SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg). Geschäftsführer: Felix Imendörffer
Hi, On Thu, 11 Mar 2021 11:47:44 +0100 Sebastian Wagner <swagner@suse.com> wrote:
Indeed. I just merged https://github.com/ceph/ceph/pull/39932 which fixes the names of those config keys.
Might want to try again (with slashes instead of underscores).
This was indeed the problem. Thanks for your fix! Regards, -- Marc 'risson' Schmitt CRI - EPITA
Quick follow-up on this, On Thu, 11 Mar 2021 14:58:41 +0100 Marc 'risson' Schmitt <risson@cri.epita.fr> wrote:
Indeed. I just merged https://github.com/ceph/ceph/pull/39932 which fixes the names of those config keys.
Cephadm is supposed to include some default Prometheus configuration for alerting[1], if this configuration is present in the container. It gets the path to this configuration from `mgr/cephadm/prometheus_alerts_path`, which is by default `/etc/prometheus/ceph/ceph_default_alerts.yml` and is indeed a valid Prometheus rules file inside the ceph-mgr container. However it doesn't end up in `/var/lib/ceph/<uuid>/prometheus/etc/prometheus/alerting/` as they should. Is there anything in particular I have to configure for this to work? [1] https://github.com/ceph/ceph/blob/v15.2.8/src/pybind/mgr/cephadm/services/mo... Thanks in advance, -- Marc 'risson' Schmitt CRI - EPITA
Hi, On Thu, 11 Mar 2021 19:40:09 +0100 Marc 'risson' Schmitt <risson@cri.epita.fr> wrote:
Cephadm is supposed to include some default Prometheus configuration for alerting[1], if this configuration is present in the container. It gets the path to this configuration from `mgr/cephadm/prometheus_alerts_path`, which is by default `/etc/prometheus/ceph/ceph_default_alerts.yml` and is indeed a valid Prometheus rules file inside the ceph-mgr container. However it doesn't end up in `/var/lib/ceph/<uuid>/prometheus/etc/prometheus/alerting/` as they should.
[1] https://github.com/ceph/ceph/blob/v15.2.8/src/pybind/mgr/cephadm/services/mo...
I think I found the problem there. The file path in the following lines of what I linked should be `alerting/ceph_alerts.yml` instead of `/etc/prometheus/alerting/ceph_alerts.yml`. Is there any way around that particular problem, apart from periodically copying the default configuration in `/var/lib/ceph/<uuid>/prometheus/etc/prometheus/alerting/`? Thanks, -- Marc 'risson' Schmitt CRI - EPITA
participants (2)
-
Marc 'risson' Schmitt
-
Sebastian Wagner