taishin / rbvmoni-zabbix

4 stars 7 forks source link

Update rbvmoni-zabbix.rb: new feature Deprovisioning group and other stuff #7

Closed jaganz closed 11 years ago

jaganz commented 11 years ago
taishin commented 11 years ago

Thank you for your pull request!

I want to merge your code.

Please tell me about the following. What kind of function is deprov_zbxHost? How can I use $includeVmwareTemplates and $EnableDeprovisioningHostGroup

(It seems that "$" has fallen out before includeVmwareTemplates of the 259th line. )

jaganz commented 11 years ago

Hi taishin and welcome back!

deprov_zbxHost, $EnableDeprovisioningHostGroup and $DEPROV_GROUP are used in conjunction. I have implemented this because in your code, Host not seen for 24 hours are deleted. In my case i want to move these hosts to a "deprovisioned group" (or "host not seen for 24 h" group, if u want). So:

u can see this in action at 319 line of my PR

Other feature: $includeVmwareTemplates . This Var permit u to choose if u want to add the Vmware Template as hosts in zabbix ... but (in my case) we don't want, so the vm that have the option stat.summary.config.template in true and $includeVmwareTemplates is in false, these hosts are skipped.

Yep, is a buggy code, sorry:

if stat.summary.config.template != true || (stat.summary.config.template == true && includeVmwareTemplates == true ) #exclude templates (jaganz)

must be:

if stat.summary.config.template != true || (stat.summary.config.template == true && $includeVmwareTemplates == true ) #exclude templates (jaganz)

in 259 line. Can u fix it?

... And thank you, i like your way to solve the problem of vsphere monitoring! ;)

taishin commented 11 years ago

Thank you for your reply!

I merged your code.

I set $EnableDeprovisioningHostGroup to false in my environment.

Thank you