· 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.

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

n8n-nodes-base.webhook @mspcopilot/n8n-nodes-connectwise.connectWisePsa @mspcopilot/n8n-nodes-connectwise.connectWisePsa @mspcopilot/n8n-nodes-connectwise.connectWisePsa n8n-nodes-base.respondToWebhook

Workflow Setup

Copy the workflow to your n8n instance and modify these items on the workflow below.

  1. Open @mspcopilot/n8n-nodes-connectwise.connectWisePsa 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.
  2. Modify Filter Clients to only include customers you want alerts for.
  3. Modify @mspcopilot/n8n-nodes-connectwise.connectWisePsa Create a ticket to use the correct Service Board and new Status.
  4. Modify @mspcopilot/n8n-nodes-connectwise.connectWisePsa Resolve ticket to have the correct Service Board and resolved Status.

How the Workflow Works

  1. @mspcopilot/n8n-nodes-connectwise.connectWisePsa Looks up the company from the tag passed from Zabbix.
  2. If it is in FAIL state, create a ticket.
  3. n8n-nodes-base.respondToWebhook Send the ticket# back to Zabbix.
  4. @mspcopilot/n8n-nodes-connectwise.connectWisePsa If it is resolved (OK status), then add a note to that ticket.
  5. @mspcopilot/n8n-nodes-connectwise.connectWisePsa 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

  1. Download this media type yaml to import: github.com/mspcopilot/zabbix-n8n-msp/zabbix_mediatypes.yaml.
  2. Navigate to Alerts > Media types.
  3. At the top right, choose Import and add the yaml file.
  4. Open the media type named n8n and change these items:
    1. webhook_url should be the n8n Webhook URL.
    2. Menu entry name set to the name of your ticketing system. eg: ConnectWise, Nilear MTX, Open in Halo, etc.
    3. 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

  1. Under Users > Users add a user named n8n.
  2. On the Media tab, add the n8n one you created earlier.
  3. You can choose severities here, or select all and select them under Actions in the next step.

Actions

  1. Under Alerts > Actions.
  2. Create trigger actions to send alerts to your ticketing system via n8n. For example, we send P1-P3 to n8n.
  3. Action tab may contain a condition where Trigger severity is greater than or equals P3.
  4. On the Operations tab, add an operation step to Send message.
    1. Steps: 2 - 2 This means it only fires on the second occurrence to reduce some noise.
    2. Step duration: 1m Each step is 1 minute.
    3. Send to users: n8n.
    4. Send to media type: n8n.
  5. To Recovery operations add Send message to the n8n user and media type.
  6. Optional: Add the same to Update operations. (We don’t process these in the example below, but they can be processed.)
Share:
Back to Blog

Related Posts

View All Posts »