Using the Ceph Manager alerts module
You can use the Ceph Manager alerts module to send simple alert messages about the IBM Storage Ceph cluster’s health by email.
ceph-mgr daemon prevents alerts from being sent. This module can, however, be
useful for standalone clusters that exist in environments where existing monitoring infrastructure
does not exist.Prerequisites
-
A running IBM Storage Ceph cluster.
-
Root-level access to the Ceph Monitor node.
Procedure
-
Log into the
cephadmshell:Example
[root@host01 ~]# cephadm shell -
Enable the alerts module:
Example
[ceph: root@host01 /]# ceph mgr module enable alerts -
Ensure the alerts module is enabled:
Example
[ceph: root@host01 /]# ceph mgr module ls | more { "always_on_modules": [ "balancer", "crash", "devicehealth", "orchestrator", "pg_autoscaler", "progress", "rbd_support", "status", "telemetry", "volumes" ], "enabled_modules": [ "alerts", "cephadm", "dashboard", "iostat", "prometheus", "restful" ] -
Configure the Simple Mail Transfer Protocol (SMTP):
Syntax
ceph config set mgr mgr/alerts/smtp_host SMTP_SERVER ceph config set mgr mgr/alerts/smtp_destination RECEIVER_EMAIL_ADDRESS ceph config set mgr mgr/alerts/smtp_sender SENDER_EMAIL_ADDRESSExample
[ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_host smtp.example.com [ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_destination example@example.com [ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_sender example2@example.com -
Optional: By default, the alerts module uses SSL and port 465.
Syntax
ceph config set mgr mgr/alerts/smtp_port PORT_NUMBERExample
[ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_port 587Do not set the
smtp_sslparameter while configuring alerts. -
Authenticate to the SMTP server:
Syntax
ceph config set mgr mgr/alerts/smtp_user USERNAME ceph config set mgr mgr/alerts/smtp_password PASSWORDExample
[ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_user admin1234 [ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_password admin1234 -
Optional: By default, SMTP
Fromname isCeph. To change that, set thesmtp_from_nameparameter:Syntax
ceph config set mgr mgr/alerts/smtp_from_name CLUSTER_NAMEExample
[ceph: root@host01 /]# ceph config set mgr mgr/alerts/smtp_from_name 'Ceph Cluster Test' -
Optional: By default, the alerts module checks the storage cluster’s health every minute, and sends a message when there is a change in the cluster health status. To change the frequency, set the
intervalparameter:Syntax
ceph config set mgr mgr/alerts/interval INTERVALExample
[ceph: root@host01 /]# ceph config set mgr mgr/alerts/interval "5m"In this example, the interval is set to 5 minutes.
-
Optional: Send an alert immediately:
Example
[ceph: root@host01 /]# ceph alerts send