float issueshttps://git.autistici.org/ai3/float/-/issues2018-11-25T18:04:51Zhttps://git.autistici.org/ai3/float/-/issues/33Masked systemd units shouldn't alert2018-11-25T18:04:51ZaleMasked systemd units shouldn't alertWe sometimes have masked systemd units with a *failed* status, for instance:
```
* mariadb.service
Loaded: masked (/dev/null; bad)
Active: failed (Result: exit-code) since Sat 2018-10-27 07:00:49 GMT; 10min ago
Main PID: 7939 (co...We sometimes have masked systemd units with a *failed* status, for instance:
```
* mariadb.service
Loaded: masked (/dev/null; bad)
Active: failed (Result: exit-code) since Sat 2018-10-27 07:00:49 GMT; 10min ago
Main PID: 7939 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
CPU: 214ms
```
this currently results in a SystemdUnitFailed alert. The alert should exclude masked units.https://git.autistici.org/ai3/float/-/issues/6Alertmanager in mesh2019-04-28T19:35:47ZaleAlertmanager in meshSe volessimo per caso in futuro avere del monitoring ridondante (a.k.a. "serio"), in teoria basta impostare *num_instances* di prometheus a 2 in services.yml e voila', magicamente abbiamo due istanze di prometheus. In questo caso pero', ...Se volessimo per caso in futuro avere del monitoring ridondante (a.k.a. "serio"), in teoria basta impostare *num_instances* di prometheus a 2 in services.yml e voila', magicamente abbiamo due istanze di prometheus. In questo caso pero', gli alertmanager dovrebbero parlarsi e coordinarsi tra loro per evitare di consegnare alert due volte.
Questo si dovrebbe poter fare con le opzioni `-mesh` di prometheus-alertmanager, in particolare credo si possa passare un elenco di *peers* (ovvero host del gruppo Ansible "prometheus" che *non* sono l'host che Ansible sta valutando) all'opzione `-mesh.peer=` (ripetuta piu' volte, nel caso).
Dovrebbe bastare una modifica a rules/roles/prometheus/templates/alertmanager.default.j2 credo.