O'Reilly logo

The DevOps 2.2 Toolkit by Viktor Farcic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using templates in Alertmanager configuration

Defining Alertmanager configuration using static text is not very useful if we're running more than one service. Instead, we should employ templates that will help us customize messages. While we're at it, we can also fix the broken link from the message and customize the title.

Before we proceed, let us remove the monitor_alert-manager service and the alert_manager_config secret. That will allow us to deploy it again with better-defined messages.

docker service rm monitor_alert-manager 
 
docker secret rm alert_manager_config 

We'll create a new secret with the complete Alertmanager configuration.

echo "route: group_by: [service] receiver: 'slack' repeat_interval: 1h receivers: - name: 'slack' slack_configs: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required