Synchronize Zabbix alert events to Flashduty via webhook (supports Zabbix 3.x ~ 7.x versions, with different configuration requirements) to achieve automated alert noise reduction.
You can obtain an integration push URL through either of these two methods:
Choose this method when you don't need to route alert events to different channels - it's simpler.
Choose this method when you need to route alerts to different channels based on alert event payload information.
Route
to configure more routing rules)
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/zabbix/zbx_mediatype_flashcat_v7.yml
Log in to the Zabbix console, select Alert > Media Types
, click the Import button in the top right corner, enter the editing page, select the configuration file downloaded above, and click Import to complete the import
Return to the Media Types page to see the imported media type. Click the name to enter the editing page, complete the URL, zabbix_url, and HTTPProxy content:
URL
: webhook push request address, simply copy the integration push URLzabbix_url
: Zabbix console address, copy directly (if your page is configured with tomcat/nginx forwarding path, please include it), the system will append trigger_id and other parameters to generate alert detail page linksHTTPProxy
: If your Zabbix Server cannot directly access Flashduty services, you can set this parameter to a proxy addressClick Update to save the configuration
The media type must be associated with a user to send events. The user must have at least read permission for hosts. It is recommended to associate directly with the Admin user. Taking the Admin user as an example:
Users > Users
, select Admin user, select media, select Add to enter the editing window:Sending notifications is one of the operations executed by actions in Zabbix. Therefore, to establish a notification, log in to the Zabbix console, select Alerts > Actions > Trigger actions
, then:
Create action
to enter the action editing pageOperations
, add notification sending configurations for three scenarios respectively:In the Operations configuration item, click Add button to enter the configuration window
Send to users: Select the user newly created or configured above
Send only to: Select Flashduty media type
Keep other configurations as default
Click Add button to complete this configuration item
Repeat the above steps to complete the configuration of Recovery operations
and Update operations
Log in to the Zabbix console, select Monitoring > Problems
to view the latest alert list.
Sent
, it means the notification was successful. Otherwise, troubleshoot according to the prompts
// 5.x version XML configuration:
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/zabbix/zbx_mediatype_flashcat_v5.xml
// 6.x version YAML configuration:
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/zabbix/zbx_mediatype_flashcat_v6.yml
Log in to the Zabbix console, select Administration > Media Types
, click the Import button in the top right corner, enter the editing page, select the configuration file downloaded above, and click Import to complete the import
Return to the Media Types page to see the imported media type. Click the name to enter the editing page, complete the URL, zabbix_url, and HTTPProxy content:
URL
: webhook push request address, simply copy the integration push URLzabbix_url
: Zabbix console address, copy directly (if your page is configured with tomcat/nginx forwarding path, please include it), the system will append trigger_id and other parameters to generate alert detail page linksHTTPProxy
: If your Zabbix Server cannot directly access Flashduty services, you can set this parameter to a proxy addressClick Update to save the configuration
The media type must be associated with a user to send events. The user must have at least read permission for hosts. It is recommended to associate directly with the Admin user. Taking the Admin user as an example:
Administration > Users
, select Admin user, select media, select Add to enter the editing window:Type: Select the Flashduty media type created above
Send To: Fill in N/A
Keep other configurations unchanged using default settings
Sending notifications is one of the operations executed by actions in Zabbix. Therefore, to establish a notification, log in to the Zabbix console, select Configuration > Actions
, then:
Create action
to enter the action editing pageOperations
, add notification sending configurations for three scenarios respectively:In the Operations configuration item, click Add button to enter the configuration window
Send to users: Select the user newly created or configured above
Send only to: Select Flashduty media type
Keep other configurations as default
Click Add button to complete this configuration item
Repeat the above steps to complete the configuration of Recovery operations
and Update operations
Log in to the Zabbix console, select Monitoring > Problems
to view the latest alert list.
Sent
, it means the notification was successful. Otherwise, troubleshoot according to the prompts
Administration > Media Types
, click Create media type
button in the top right corner to enter the editing pageScript
for Type, fill in the following content for Parameter in order (do not adjust the order, leave empty if no value, the script gets parameter values in sequence):{ALERT.SUBJECT}
: Alert title, keep as first parameter
{ALERT.MESSAGE}
: Alert message, keep as second parameter
FlashDuty webhook push URL
, simply copy the integration push URL, keep as third parameter
Zabbix console address
, copy directly (if your page is configured with tomcat/nginx forwarding path, please include it), used to generate alert detail page links. Leave empty if none, keep as fourth parameter
HTTPProxy
: If your Zabbix Server cannot directly access Flashduty services, you can set this parameter to a proxy address. Leave empty if none, keep as fifth parameter
send-to-flashduty.sh
for Script name
#1. Enter alert script loading directory (specific address configured in Zabbix Server configuration file `AlertScriptsPath` variable, usually `/usr/lib/zabbix/alertscripts`)
cd /usr/lib/zabbix/alertscripts
#2. Download script
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/zabbix/send-to-flashduty.sh
#3. Change script to executable status
chmod +x send-to-flashduty.sh
the script uses curl and jq commands
, ensure that the Zabbix server process can find and execute these two commands, if not you need to install them as neededThe media type must be associated with a user to send events. The user must have at least read permission for hosts. It is recommended to associate directly with the Admin user. Taking the Admin user as an example:
Log in to the Zabbix console, select Administration > Users
, select Admin user, select media, select Add to enter the editing window:
Type: Select the Flashduty media type created above
Send To: Fill in N/A
Keep other configurations unchanged using default settings
Click Add button to exit the add media window
Click Update button to exit the edit user page
Sending notifications is one of the operations executed by actions in Zabbix. Therefore, to establish a notification, log in to the Zabbix console, select Configuration > Actions
, then:
Click Create action
to enter the action editing page
Select Operations
, update notification user configurations for three scenarios respectively:
In the Operations configuration item, click Add button to enter the configuration window
Send to users: Select the user newly created or configured above
Send only to: Select Flashduty media type
Keep other configurations as default
Click Add button to complete this configuration item
Repeat the above steps to complete the configuration of Recovery operations
and Update operations
Select Operations
, update notification content configurations for three scenarios respectively:
-----FlashDuty Required Starts-----event_severity={TRIGGER.SEVERITY}||event_name={TRIGGER.NAME}||event_id={EVENT.ID}||event_tags={EVENT.TAGS}||event_ack={EVENT.ACK.STATUS}||event_value={EVENT.VALUE}||trigger_id={TRIGGER.ID}||trigger_desc={TRIGGER.DESCRIPTION}||trigger_expr={TRIGGER.EXPRESSION}||host_group={TRIGGER.HOSTGROUP.NAME}||host_ip={HOST.IP}||host_name={HOST.NAME}||item_name={ITEM.NAME}||item_value={ITEM.VALUE}-----FlashDuty Required Ends-----
Repeat the above steps to complete the configuration of Recovery operations
and Update operations
Log in to the Zabbix console, select Monitoring > Problems to view the latest alert list.
Click Actions, you can see the message notification results in the popup
Find the Flashduty corresponding log, if the Status is Sent, it means the notification was successful. Otherwise, troubleshoot according to the prompts
Return to the integration list, if the latest event time is displayed, it means the configuration is successful and events are being received
Done
Zabbix to Flashduty alert severity mapping:
Zabbix | Flashduty | Status |
---|---|---|
Disaster | Critical | Critical |
High | Critical | Critical |
Average | Warning | Warning |
Warning | Warning | Warning |
Information | Info | Info |
Not classified | Info | Info |