Setting up Alertmanager
Setting up alerts with Prometheus involves two steps:
- First, you will need to create your alerting rules in Prometheus;
- Second, you will need to set up the Alertmanager so it can receive alerts specified in Prometheus and manage them through its pipeline of silencing, inhibition, grouping and sending out notifications.
In this article, we will show you the steps about how to set up the Alertmanager.
1. Locate the application
Log in to the Client Panel and locate your target deployment on the Home page or the My Applications page.
2. Navigate to the "Shell / SSH" page
Click the "Manage" button on the Home page or the My Applications page. Then Click the "Shell / SSH" tab in the menu bar.
On the Shell / SSH page, you can see a "Connect" button, which is only open to the accounts that has passed our verification process for security reasons. To update your billing account information, please log in to the client panel.
Click the Connect button to initiate a shell session. You can issue commands in it.
3. Configure the Alertmanager
Go to where the configuration file prometheus.yml locates by the following command
Then, update the configuration file with the Alertmanager configurations.
Go to the file editing interface via the command
Insert the alertmanager configurations as the following screenshot shows
alerting: alertmanagers: - static_configs: - targets: - "127.0.0.1:9093" path_prefix: /alertmanager basic_auth: username: admin password: 'yourpassword' // replace it with the password of your admin user
Save the update and exit the editing insterface.
4. Restart the Prometheus service to make updates effective
Restart the service via the command below.
supervisorctl restart prometheus
That's it. You've finished configuring the Alertmanager. You can now receive and manage alerts in the Alertmanager.