Odoo Zabbix integration

Zabbix Connector

Zabbix problems become tasks for the right customer. Recoveries close them.

Zabbix and Odoo 19

What it does

Odoo keeps a list of the hosts Zabbix monitors, with interfaces, groups, tags and inventory, and opens an incident with a project task for each Zabbix problem. When Zabbix reports the recovery of a problem nobody worked on, the task closes by itself. Odoo only reads from Zabbix.

You paste a Zabbix API token of a read-only user. Sync Hosts (by button or every hour) brings every host with its technical and visible name, monitoring and maintenance status, agent, SNMP, IPMI and JMX interfaces, host groups, tags and inventory: OS, vendor, model, serial number, asset tag, MAC address, location and contact. A renamed host is updated in place, a host removed from Zabbix is archived, and a yellow banner lists what is missing from its documentation.

Each Zabbix host group can belong to a customer. Hosts of that group, their incidents and their tasks get the customer, and the customer form shows a Zabbix Hosts button.

Problems arrive through a Zabbix webhook media type (the script is in the module) or a read every 5 minutes. One Zabbix event gives one incident. A trigger that fires again while its incident is open adds a note instead of a second task. You choose the lowest severity that counts and the severity that stars the task, and an hourly limit stops a flood.

When Zabbix reports the recovery, a task nobody wrote on, was assigned to or moved goes to the self-recovered stage. Once a person worked on it, the recovery becomes a note and closing stays with them. Acknowledgements and comments made in Zabbix arrive as internal notes with the Zabbix user name.

Who it is for

  • Managed service providers watching client networks in Zabbix. Each Zabbix host group can be linked to a customer, so a problem on a client's switch opens an incident and a project task under that client. The customer form gets a Zabbix Hosts button and a count of its incidents.
  • Internal IT teams that plan work in Odoo Project. Alerts land in the same project as user requests, as tasks named like the Zabbix mails (Problem: ... on host). From the severity you pick upward, tasks are starred as high priority.
  • Teams that want an asset list matching what is actually monitored. Sync Hosts copies every host with its interfaces, host groups, tags and Zabbix inventory: OS, serial number, model, vendor, location, asset tag and MAC address. Hosts that disappear from Zabbix are archived, and a Missing Documentation filter shows the gaps.
  • On-call staff tired of closing alerts that fixed themselves. If Zabbix reports a recovery and nobody wrote on, assigned or moved the task, it moves to the self-recovered stage you chose. Once someone has worked on it, the recovery is only posted as a note.

Setting it up

  1. In Zabbix, create a user with read access to the host groups you care about and generate an API token for it under Users > API tokens.
  2. In Odoo go to Zabbix > Configuration > Zabbix Servers, create a server with the public https frontend address and the API token, pick the Run As user and press Test Connection.
  3. Press Sync Hosts, then open Zabbix > Configuration > Host Groups and set the customer for each group. Tick Hourly Host Sync on the server's Hosts tab if you want it repeated.
  4. On the Incidents tab, choose the Incident Project, the Lowest Severity, High Priority From, the Self-Recovered Stage and the Incidents Per Hour Limit.
  5. To get problems in, either tick Read Problems Every 5 Minutes, or tick Accept Zabbix Webhook on the Webhook tab, copy the Webhook URL and Media Type Script into a new Zabbix webhook media type and use it in a trigger action.
  6. For the silence watch, add a Zabbix HTTP agent item that calls the Heartbeat URL every few minutes, and set Silence Alert After (minutes), 30 by default.

Zabbix Connector: questions

Which Zabbix versions does it work with?

It authenticates with an API token sent as a Bearer header, which Zabbix supports from 6.4. The module is written for 6.4, 7.0, 7.4 and 8.0.

Can Odoo change anything in my Zabbix?

No. The client refuses any API method other than the .get calls and apiinfo.version, so hosts, triggers and acknowledgements in Zabbix are never written to. Acknowledging a problem still happens in Zabbix, and the comment then shows up in Odoo as an internal note.

Does it need Enterprise or the Helpdesk app?

No. It depends only on Project and Discuss mail, both in Odoo 19 Community. Incidents become project tasks, not helpdesk tickets.

Can my Zabbix server be on a private network?

Not as the frontend address. Odoo only accepts a public https address and refuses loopback, private and reserved IPs. If Zabbix sits behind a firewall, the webhook route still works because Zabbix calls Odoo, though each event is read back from the API before an incident is made.

How is the webhook protected?

Each server gets a random secret in its webhook address, checked with a constant-time compare, plus an optional list of allowed caller addresses and a 16 KB body limit. New Secret replaces the address if it leaks.

Does it work with several companies?

Yes. Every server belongs to one company, and record rules keep its hosts, host groups, incidents and API log inside that company.