laradji/zabbix — pull request #115 by ftclausen (2013-10-29 16:43:52+00:00)
Title: Initial support for agent registration and update. 

Hello,

I noticed from issues 105 and 108 that agent registration was not working and, from my review of the provider, not yet complete. We have an immediate need for agent auto registration so I went ahead and coded up initial support for this which seems to be working although I am still testing it further. Nevertheless I wanted to share this with you. Agent *registration* and *update* are working in my initial tests. New Attributes are

* node['zabbix']['agent']['templates'] - A list of templates this host should use
* node['zabbix']['agent']['interfaces'] - A list of interfaces this host uses; default "zabbix_agent". Accepts "zabbix_agent", "jmx" and "snmp"
* And still to do "node['zabbix']['agent']['create_missing_groups'] - define in attributes/agent.rb with "true" as default

I am still learning what Zabbix has to offer so we can almost certainly expand this cookbook to cover more things. E.g. somehow specifying the JMX user and pass via Chef.

I would like to highlight the following things that may be issues

* The code could be more "Rubyesque"; I am still learning Ruby
* Java gateway for JMX is not yet managed by Chef
* The "update" logic triggers with every run which may cause Zabbix server load
* Manually update zabbixapi Gem to support latest server API versions

Please don't hesitate to contact me regarding further testing, etc.