BaldMansMojo / check_vmware_esx

chech_vmware_esx Fork of check_vmware_api.pl
GNU General Public License v2.0
124 stars 67 forks source link

Non existent cluster name cause script error #44

Closed ccesario closed 5 years ago

ccesario commented 10 years ago

When passed a non existent cluster as param, the script return a script error

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster WrongName --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S runtime Can't use string ("WrongName") as a HASH ref while "strict refs" in use at /tmp/check_vmware_esx/check_vmware_esx line 8780.

/tmp/check_vmware_esx/check_vmware_esx --authfile /tmp/check_vmware_esx/auth --datacenter 192.168.X.X --cluster Cluster --sessionfile check-vmware-esx.session --sessionfiledir /tmp --timeout 90 -S runtime 18/24 VMs up, overall status=green, no config issues|vmcount=18;;;;

BaldMansMojo commented 10 years ago

I will check when rewriting that part of code. thanks. By the way - you do not need to give a sessionfile name. This is generated automatically. --sessionfile is only for addiditional sessionfiles. If you have for example 50 checks for one host serialization will take too much time. If you pass a name here you are abe to have more than one sessionfile for the host.. In the Nagios command definition you take a macro (like $ARGx$) and define the name of the sessionfile in the service check definition. within the check_command parameters. Martin

BaldMansMojo commented 5 years ago

Sorry - cluster is old stuff from op5 and buggy. But I had not the time for a real clean up. But it is on my to do list.