Alerts module

The alerts module can send simple alert messages about cluster healthvia e-mail. In the future, it will support other notification methodsas well.

  • note
  • This module is not intended to be a robust monitoringsolution. The fact that it is run as part of the Ceph clusteritself is fundamentally limiting in that a failure of theceph-mgr daemon prevents alerts from being sent. This modulecan, however, be useful for standalone clusters that exist inenvironments where existing monitoring infrastructure does notexist.

Enabling

The alerts module is enabled with:

  1. ceph mgr module enable alerts

Configuration

To configure SMTP, all of the following config options must be set:

  1. ceph config set mgr mgr/alerts/smtp_host *<smtp-server>*
  2. ceph config set mgr mgr/alerts/smtp_destination *<email-address-to-send-to>*
  3. ceph config set mgr mgr/alerts/smtp_sender *<from-email-address>*

By default, the module will use SSL and port 465. To change that,:

  1. ceph config set mgr mgr/alerts/smtp_ssl false # if not SSL
  2. ceph config set mgr mgr/alerts/smtp_port *<port-number>* # if not 465

To authenticate to the SMTP server, you must set the user and password:

  1. ceph config set mgr mgr/alerts/smtp_user *<username>*
  2. ceph config set mgr mgr/alerts/smtp_password *<password>*

By default, the name in the From: line is simply Ceph. Tochange that (e.g., to identify which cluster this is),:

  1. ceph config set mgr mgr/alerts/smtp_from_name 'Ceph Cluster Foo'

By default, the module will check the cluster health once per minuteand, if there is a change, send a message. To change thatfrequency,:

  1. ceph config set mgr mgr/alerts/interval *<interval>* # e.g., "5m" for 5 minutes

Commands

To force an alert to be send immediately,:

  1. ceph alerts send