Explore documentation
Zabbix & Better Stack integration
This integration allows you to create Uptime incidents from Zabbix automatically
Connecting Prometheus and Uptime
1. In the Uptime dashboard
- Log into your Uptime dashboard and on the left panel click Integrations
- Click the Importing data tab
- Scroll down and look for the Infrastructure monitoring section
- Find the Zabbix card and click the Add button
- In the new window, name your Zabbix integration (e.g.: Backend service) and click Save changes. Don't close the Uptime dashboard just yet, you'll need it in a moment.
2. In the Zabbix dashboard
- Open the Zabbix dashboard
- Click on Create media type in the upper right corner
- Enter Name: Uptime
- Select Type: Webhook
- Remove all parameters except* Message: {ALERT.MESSAGE}*
Input the Zabbix Media type Script found in the Uptime configuration into the Script field and click Apply or copy it from here
// Make a POST request to the Uptime Zabbix Webhook // https://uptime.betterstack.com/api/v2/zabbix/webhook/sHvzVfzMofxz6eD4XdZEEqdF var request = new CurlHttpRequest(); request.AddHeader('Content-Type: application/json'); var response = request.Post('https://uptime.betterstack.com/api/v2/zabbix/webhook/sHvzVfzMofxz6eD4XdZEEqdF', value); if (request.Status() != 200) { throw 'Response code: ' + request.Status(); } return response;
Make sure Enabled is checked
Click Add
3. Create a new user in Administration > Users
- Click on Create user in the upper right corner
- Enter Alias: Uptime user
- Add this user to a group of your choosing and input any password (we won't see the password)
- Switch to the Permissions tab
- Add host read permissions to the user so that it can receive messages. You can also achieve this for all hosts by promoting the user to a SuperAdmin
- Switch to the Media tab
- Add Uptime as a new Media
- Fill anything in the Send field (Zabbix requires a value, but it's not used by Uptime)
- Select severities you want to report to Uptime
- Click Add to save the media options
- Click Add again to save the user
4. Create a new Action in Configuration > Actions
- Click on Create action in the upper right corner
- Enter the Name: Uptime Action
- (Optional) Restrict the action by adding your own conditions.
- Switch to the Operations tab
- Change Default operation step duration to 1m
- Under Operations, click Add
- Select Uptime user in the Send to Users field
- Select Uptime in the Send only to select box
- Check Custom message and input the Operational message found below to the Message field (you can leave the Subject empty).
- Click Add to save the operation
- Repeat steps 30. - 34. for Recovery operations and Update operations, filling their respective messages
- After filling Recovery and Update operations, click Add to save the action