Truenas-app-zabbix-agent - A Dockerised Zabbix agent application for TrueNAS environments

Heya,

After a failed attempt at doing this natively in a app, I present to you, truenas-app-zabbix-agent!

This is essentially the stock zabbix-agent docker container, but with the TrueNAS API (and midclt binary) installed as well. Due to the TN API going websockets and Zabbix server not supporting that, and the TN SNMP support being, lets say, lacking, I came up with this instead to basically act as middleware to the middleware.

Feedback welcome, and assistance with building out the Zabbix template more is welcome (I’m well over going crosseyed over Zabbix weirdness for the moment.)

1 Like

I think calling into midclt for each zabbix op will probably generate too much audit churn because each midclt command will create and tear down an authenticated middleware session. It’d probably be better to design a daemon that maintains a persistent middleware session and have zabbix send commands to it.

1 Like

Well, it uses dependent items, so it only fetches basically all items at once, once per period configured (1 minute is in the template). So it doesn’t do a call per Zabbix item.

That said, yes, it does cause those audit events every minute (user configurable). But, wouldn’t polling via SNMP as well? If it doesn’t, it should.

Either way, I’m cooking up a better way as we speak.

Ok, rewritten and improved how!

New topic here.