Skip to main content

Configuring Prometheus and AlertManager

This section describes how to configure the Prometheus server to scrape metrics from Aerospike Prometheus Exporter, send alerts to an Alertmanager instance, and add an Aerospike alert rules configuration file.

Configure Prometheus

Specify values for global parameters.

scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).

Optional: Enable the sending of alerts by listing the IP addresses and ports of target instances of AlertManager.

- static_configs:
- targets:
- "alertmanager:9093"

Configure rules for sending alerts.

Download the Aerospike rules-configuration file. This file configures fourteen alert rules. You can download it from the config/prometheus/ folder of the aerospike-monitoring GitHub repository. The link is

Copy the file to the path /etc/prometheus/.

Add the path to the file as the value of the rules_file parameter in prometheus.yml.

- "/etc/prometheus/aerospike_rules.yaml"

Specify the instances of Aerospike Prometheus Exporter that you want Prometheus to scrape.

- job_name: 'aerospike'
- targets: ['', '']

Configure AlertManager

The Alertmanager supports various configurations depending on where the notifications need to be sent.

An example that sends alerts to Slack is available as a file from GitHub Gist.

For more details, see the documentation for AlertManager.