I’ve begun development of a binding for Zabbix and looking for some advice on how to structure the binding to match how Zabbix works.
Zabbix has three levels of abstraction before you hit actual data:
- The server itself
- A host monitored by the server (server has 0-n hosts)
- An item associated with the host (host has 0-n items)
- The data value - integer, float, string etc (item has a single value)
The challenge I’m having mapping this abstraction to OpenHAB is that everything in Zabbix is very dynamic! You don’t know about the hosts or items until you query a server. The only static part about this structure is the single data value once you get to the end (which will ultimately be a channel in OpenHAB).
I’ve started with a bridge for the server and a Thing for a host, but realised I now have to statically create channels associated with the host (which map to Zabbix items), but I don’t know what to create as the items depend on the Zabbix configuration.
The alternative is to create TWO bridges (server and host) and one thing (item) with a single channel (value). I’m not sure if this is even possible or sensible with OpenHAB…
What structure should I create in OpenHAB to handle this?