Alertmanager Configuration Guide

SigNoz allows you to configure Alertmanager settings through environment variables. This guide covers how to configure SMTP server settings for email notifications and external URL settings for alert links.

These settings are configured via environment variables following SigNoz's environment variable naming convention.

Info

We are working on introducing a unified configuration system that will allow setting these parameters globally through a single configuration. You can track the progress in #6805.

External URL Alertmanager Configuration

The following environment variable is crucial for generating correct links back to the SigNoz UI within alert notifications:

Environment VariableDescription
SIGNOZ_ALERTMANAGER_SIGNOZ_EXTERNAL__URLThe URL under which SigNoz (and Alertmanager) is externally reachable (e.g., https://signoz.example.com). Required for links in alert notifications. Set this to the URL where your SigNoz instance is hosted.

SMTP Configuration for Email Alerts

SigNoz utilizes Prometheus Alertmanager to handle alerting rules and notifications. You can configure Alertmanager to send alert notifications via email using SMTP. Currently, SMTP configuration is done through environment variables.

The following environment variables can be set to configure SMTP settings:

Environment VariableDescription
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__FROMThe email address used in the From header
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__HELLOThe hostname sent with EHLO/HELO command (defaults to "localhost")
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__SMARTHOSTSMTP server address and port (e.g., "smtp.example.com:587")
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__AUTH__USERNAMEUsername for SMTP authentication
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__AUTH__PASSWORDPassword for SMTP authentication
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__AUTH__PASSWORD_FILEPath to file containing SMTP password
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__AUTH__SECRETSecret for SMTP authentication
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__AUTH__IDENTITYIdentity for PLAIN authentication
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__REQUIRE__TLSWhether to require TLS (defaults to true)
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CAText of the CA certificate
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CERTText of the client certificate
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__KEYText of the client key
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CA__FILEPath to CA certificate file
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CERT__FILEPath to client certificate file
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__KEY__FILEPath to client key file
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CA__REFName of secret in secret manager to use as CA certificate
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CERT__REFName of secret in secret manager to use as client certificate
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__KEY__REFName of secret in secret manager to use as client key
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__SERVER__NAMEServer name for SNI and certificate verification
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__INSECURE__SKIP__VERIFYSkip TLS verification (use with caution)
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__MIN__VERSIONMinimum TLS version (e.g., "TLS12", "TLS13")
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__MAX__VERSIONMaximum TLS version (e.g., "TLS12", "TLS13")

Remember to consult your SMTP provider's documentation for specific requirements regarding ports, authentication, and TLS settings. When setting up email notifications, ensure these environment variables are properly configured in your deployment environment.

Common Alertmanager Configuration Scenarios

Below are examples demonstrating common Alertmanager configurations. These examples cover typical use cases you may encounter when configuring up alertmanager.

Disabling TLS for SMTP

In scenarios where you need to connect to an SMTP server without TLS (e.g., for internal testing or specific server configurations), you can disable TLS requirement and verification:

SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__REQUIRE__TLS=false
SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__INSECURE__SKIP__VERIFY=true

Was this page helpful?