Member-only story

Ceph Alert Email Setup

DaeGon Kim
2 min readJan 17, 2024

Ceph manager provides a simple email alert system using alerts module. The official document says ,“This module is not intended to be a robust monitoring solution”. But it provides an email notification when Ceph health status changes.

Enabling this alerting is not complicated, so this article will be short. The tricky part is getting a correct configuration for a SMTP server. So far, we tried three different SMTP servers and their configutation are slightly different like having different stmp_ports. In this article, we will use GMail SMTP server.

These commands will enable alerts module and configure stmp server to use with sender and receiver information.

sudo ceph mgr module enable alerts
# SMTP configuration for gmail account
sudo ceph config set mgr mgr/alerts/smtp_host smtp.gmail.com
sudo ceph config set mgr mgr/alerts/smtp_port 465
sudo ceph config set mgr mgr/alerts/smtp_ssl true
sudo ceph config set mgr mgr/alerts/smtp_destination [to@example.com]
sudo ceph config set mgr mgr/alerts/smtp_sender [from@example.com]
sudo ceph config set mgr mgr/alerts/smtp_from_name [sender name]
sudo ceph config set mgr mgr/alerts/smtp_user [gmail account]
sudo ceph config set mgr mgr/alerts/smtp_password [app password]
# sending a test email
sudo ceph alerts send

To disable it, use the following command.

sudo ceph mgr module disable alerts

To query each configuration value, we can use ceph config get command.

sudo ceph config get mgr mgr/alerts/[property]

GMail Setting

The Gmail SMTP server supports port 587 and 465. The 587 port support more advanced security, but Ceph manager alerts module does not support it. To get an app password, 2FA (two factor authentification) needs to be enabled on the account. This page shows how to create an app password.

--

--

No responses yet