The built-in Zabbix Notifications trigger initiates flows when it receives a request from a webhook in Zabbix.
- Go to the Triggers tab in the palette, expand the App Triggers section, and drag the trigger onto the canvas.
- Double-click the trigger (or click the pencil icon).
- Set the authenticating user, and then copy the URL — you'll use this to set up the webhook in Zabbix. Alternatively, you can create an integration user and use it as the authenticating user.
- Click the Flood Control tab to edit the trigger's default flood control settings. For more information about these settings, see Trigger Flood Control.
- Click Done.
- On the flow canvas, connect the steps you want to run when xMatters receives a request to that URL.
You're now ready to configure Zabbix to target the trigger.
Configure Zabbix to send requests to the trigger URL
To have Zabbix send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL.
- In Zabbix, go to Administration and select Media Types.
- Click Import.
- Select xMatters_media_type.xm to import it:
- Once imported, edit the file by selecting it from the list:
- Change the xm_url to the trigger URL you copied from xMatters earlier.
- If you're using Basic or API key authentication, update the xm_auth with your Base-64 encoded username and password in the following format: username:password or api_key:secret.
- Add the target names of any recipients you want xMatters to notify when the alert fires.
- For example, if you want to notify Emma Pearson and the on-call members in the group responsible for the Antares service, you'd add ?recipients=epearson,antares to the URL. You must URL-encode any special characters or spaces in the target names.
- Click Update to save the file.
Now you need to create an xMatters user in Zabbix.
- In Zabbix, go to Administration and select Users.
- Click Create user:
- On the User tab, enter the following information:
- Alias: xMatters
- Name: xMatters
- Surname: API
- Groups: Select any group available in your instance of Zabbix
- Password: Set a password for this user
- Password (once again): Confirm the password
- On the Media tab, click Add and enter the following information (the other fields can be left with the default information):
- Type: xMatters
- Send to: xMatters
- Click Add.
- On the Permissions tab, type and select the Super admin role
- When complete, the user screen should look similar to this:
- Click Add.
You now need to create an action in Zabbix.
- In Zabbix, go to Configuration and select Actions.
- Create a new action and give it a unique Name. You can also modify existing actions.
- Create the Conditions and click Add:
- On the Operations tab, Add xMatters as a user to the Send to users sections for Operations, Recovery operations, and Update operations:
- Click Update to save all changes.
You're ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
The trigger has the following outputs you can use as inputs to steps further along the flow.
|Recipients||List of targeted recipients.|
|Signal Mode||Determines the flow path to follow, based on the value of the Event Value parameter.|
|Signal ID||Key or identifier used to terminate or correlate events or signals|
Whether or not the event is acknowledged in Zabbix. Valid value are:
|Date||Date the event was initiated.|
|Event ID||Unique ID of the event in Zabbix.|
|Event Name||Name of the event as provided by Zabbix.|
Severity of the event. Valid values are:
|Operational Data||Data that triggered the event in Zabbix.|
|Tags||Comma-separated list of event tags provided by Zabbix.|
|Time||Time the event was initiated in Zabbix.|
Whether or not the notification is an event update in Zabbix. Valid values are:
|State||Whether the event is open or resolved in Zabbix.|
|Host IP||IP of the host that triggered the Zabbix event.|
|Host Name||Name of the host that triggered the Zabbix event.|
|Trigger Description||Description of the trigger that created the Zabbix event.|
|Trigger ID||Unique ID of the trigger that created the Zabbix event.|
|Raw Request||JSON representation of the request that can be parsed separately to get additional context on outputs.|