Enabling Prometheus Alertmanager alerts


In order to configure alerts, your MicroCeph deployment must enable metrics collections with Prometheus. Follow this How-To if you haven’t configured it. Also, Alertmanager is distributed as a separate binary which should be installed and running.


Prometheus Alertmanager handles alerts sent by the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email. It also takes care of silencing and inhibition of alerts.

Alerts are configured using Alerting Rules. These rules allows the user to define alert conditions using Prometheus expressions. Ceph is designed to be configurable with Alertmanager, you can use the default set of alerting rules provided below to get basic alerts from your MicroCeph deployments.

The default alert rules can be downloaded from here

Configuring Alert rules

Alerting rules and Alertmanager targets are configured in Prometheus using the same config file we used to configure scraping targets.

A simple configuration file with scraping targets, Alertmanager and alerting rules is provided below:

# microceph.yaml
        monitor: 'microceph'

# Scrape Job
  - job_name: 'microceph'

    # Ceph's default for scrape_interval is 15s.
    scrape_interval: 15s

    # List of all the ceph-mgr instances along with default (or configured) port.
    - targets: ['', '', '']

rule_files: # path to alerting rules file.
  - /home/ubuntu/prometheus_alerts.yaml

    - static_configs:
      - targets: # Alertmanager <HOST>:<PORT>
        - ""

Start Prometheus with provided configuration file.

prometheus --config.file=microceph.yaml

Click on the ‘Alerts’ tab on Prometheus dashboard to view the configured alerts:


Look we already have an active ‘CephHealthWarning’ alert! (shown in red) while the other configured alerts are inactive (shown in green). Hence, Alertmanager is configured and working.