laradji / zabbix

Zabbix chef cookbook
Apache License 2.0
91 stars 125 forks source link

Bugfixes and enhancements to allow auditing of zabbix config from chef #185

Closed vitroth closed 4 years ago

vitroth commented 9 years ago

Each individual commit has its own comments, but overall these enable a site to use the zabbix cookbook to audit and compare the hosts/items/triggers/templates in the zabbix database against the chef system database, so hosts removed from chef can be removed from monitoring, and monitoring items/triggers that have been added by chef can be removed if chef no longer specifies them (i.e. a host role changed, or trigger rules were changed). (Doing that requires marking items/triggers with a site-specific string in the name when adding them, and then fetching all items/triggers with that name to compare against what the site cookbook's now say should exist.)

Also added a userparam resource type to create zabbix-agent config files in the agent's include_dir. Each userparam resource will create a unique file with a single UserParam configuration entry. This allows sites to configure custom monitoring items in a per-application scalable way.

guilhem commented 9 years ago

@vitroth Thanks for your PR, but please be careful about tests and foodcritic

vitroth commented 9 years ago

I'm looking at those test results now trying to understand why it failed. The code in recipes/agent.rb on line 29 appears to be whats causing rake to abort but that wasn't changed by this PR.

The remaining warnings appear to be complaints about accessing node attributes via node[:zabbix]... syntax vs node["zabbix"]. I'll update those.

vitroth commented 9 years ago

All foodcritic issues now addressed.

guilhem commented 9 years ago

thanks for foodcritic :) :+1:

guilhem commented 9 years ago

Oh, you seems to fix rubocop too

vitroth commented 9 years ago

Corrected an error introduced while addressing rubocop comments.

vitroth commented 9 years ago

Any updates on the status of this PR?

vitroth commented 9 years ago

Ping? I have additional changes in our fork that I'd like to submit back upstream as well, but these baseline changes need to be merged first. Is there anything you need from me to make it easier to merge this PR?

laradji commented 4 years ago

@vitroth do you want to be the maintainer ? i dont use zabbix currently ?