Send data to Zabbix

Hi All,

I’m happy to build this one, but would like to gauge people interest first. The current Zabbix component only allows for data to be retrieved from zabbix, however I feel it would be useful to be able to report data from HA sensors (e.g. Z-wave) back to Zabbix for alerts, etc. This could be done in a similar fashion to influxdb, but would require items to be manually enabled before they would be sent (as Zabbix requires items to be created manually)

What are people’s thoughts on this?

Thanks

Sounds nice.

Zabbix doesn’t technically need to have the items created beforehand though. It could work using autodiscovery where it would query an endpoint in HA (like the API endpoint for Google Assistant) to gather the available items and would create them automatically.

1 Like

You’re thinking low level discovery, which might also work (not sure if it can do it without the agent/only with the sender, I’ll have to check)

It should not require an agent. Besides, there is a Python package that contains the agent protocol making it easy to “make” an agent if needed :slight_smile:

Did you look into this? I have had the need for quite a while. At the moment I have set up a few items as trappers and use a cron job to fetch data from Home Assistant and send it to Zabbix. In most cases that is a good enough process, but in some cases it would be a lot better with an event driven system.

For example; I have a z-wave power meter that reads an outlet that uses > 2kW when in use, and otherwise 0. It’s normally used less than a minute at a time, so the data in my Zabbix gets quite inaccurate in that case.

To me, an option to send all updates to Zabbix trapper items would be a good enough solution.

I’m new in HA but I interested in integration with Zabbix too to send sensor’s data by some triggers. As I remember, Zabbix have 2 types of agents - active and passive. I guess that the active agent will be useful, because it allows to send data to Zabbix and can be included in HA integrations.
It should enable to specify for each sensor or sensor type:

  • message format
  • should have a limit how often notification can be sent to Zabbix

I’m still working on this when I have time, however currently my solution isn’t very stable and has fairly regular issues with sending the data.

I do have a working solution for pulling data from Home Assistant into Zabbix, which is currently being reviewed by the Home Assistant devs. Hopefully this should be done in time for the next release.

This would have been great! Any news regarding the solution?

Any updates on this? I am very interested to know if this is possible.

I’m currently using the zabbix integration with HA, which seems to use the pyzabbix library to send to the zabbix server. This works and I think it is using zabbix_sender to do this. However, all my devices are on a separate network and can only be monitored using a zabbix proxy.

I would like to have HA send data to my proxy and have this work. The HA configuration looks like it will be talking to the zabbix server API, which is not what I want.

I know I can use zabbix_sender to send data to a proxy and this will. I don’t understand why the config is biased for the API and not just the zabbix_sender options for host, port, tls, timeout…

So, CyberJacob, are you using zabbix_sender to forward HA data to a zabbix server and will it possible to use a proxy for this?

For everyone else, is the HA zabbix integration only using the zabbix API? Can it be made to use zabbix_sender?

I have now built my Battery state monitoring on top of Zabbix LLD with HTTP Agent and the HA API.
If you need a guide / quick rundown of it, let me know.

This should be sufficient for what I’m wanting. If the HA API is used by a local Zabbix agent, and that is sent to a local Zabbix proxy, then the data will be secure and efficient as it is sent from the local private network to the Zabbix server.

I’ll read through the HA API and try it out. Thanks for the idea, Leodalton.

Using pyzabbix blasts a ton of data across the network.

1 Like