· Dan · Guides · 3 min read
Zabbix Multi-Tenant Ticketing Integration
How to process Zabbix alerts in n8n and send them to any ticketing system like ConnectWise, Halo or Autotask with round-trip ticketing.
Need more extended monitoring for some devices, but don’t want to pay for Auvik yet? Surprisingly, you can get Zabbix to work in a multi-tenant setup. Here’s how we did it.
Multi-tenant Zabbix for MSPs
Tags can be used for many things, including clients. At each host, add a tag named customer. For all devices, put a unique identifier that can be looked up in your PSA in that tag. We use the Company ID.
The Workflow
Workflow Setup
Copy the workflow to your n8n instance and modify these items on the workflow below.
- Open
Get a company and change the lookup to match the tag name and lookup you are doing. By default we lookup by Company Identifier in the Zabbix tag
customer. - Modify Filter Clients to only include customers you want alerts for.
- Modify
Create a ticket to use the correct Service Board and new Status.
- Modify
Resolve ticket to have the correct Service Board and resolved Status.
How the Workflow Works
-
Looks up the company from the tag passed from Zabbix.
- If it is in FAIL state, create a ticket.
-
Send the ticket# back to Zabbix.
-
If it is resolved (OK status), then add a note to that ticket.
-
Mark it resolved.
Notes
- Depending on your setup, you may want to create a ticket even if no company is found. Add a step after If Company Found > False to set an ID and continue to Switch.
Zabbix Alerts Setup
Media Type/Webhook
- Download this media type yaml to import: github.com/mspcopilot/zabbix-n8n-msp/zabbix_mediatypes.yaml.
- Navigate to Alerts > Media types.
- At the top right, choose Import and add the yaml file.
- Open the media type named n8n and change these items:
- webhook_url should be the n8n Webhook URL.
- Menu entry name set to the name of your ticketing system. eg:
ConnectWise,Nilear MTX,Open in Halo, etc. - If using ConnectWise PSA, set Menu entry URL to
https://na.myconnectwise.net/v4_6_release/services/system_io/Service/fv_sr100_request.rails?service_recid={EVENT.TAGS.ticket}.
Under Administration > General > Trigger displaying options, set the classification/priorities to match your ConnectWise priorities. These are used in the workflow below to set the ticket priority.
Users
- Under Users > Users add a user named
n8n. - On the Media tab, add the n8n one you created earlier.
- You can choose severities here, or select all and select them under Actions in the next step.
Actions
- Under Alerts > Actions.
- Create trigger actions to send alerts to your ticketing system via n8n. For example, we send P1-P3 to n8n.
- Action tab may contain a condition where Trigger severity is greater than or equals P3.
- On the Operations tab, add an operation step to Send message.
- Steps:
2-2This means it only fires on the second occurrence to reduce some noise. - Step duration:
1mEach step is 1 minute. - Send to users:
n8n. - Send to media type:
n8n.
- Steps:
- To Recovery operations add Send message to the
n8nuser and media type. - Optional: Add the same to Update operations. (We don’t process these in the example below, but they can be processed.)