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

VMware Tools state: too much output #62

Closed simonmeggle closed 9 years ago

simonmeggle commented 9 years ago

For my understanding, this is a little bit too much output which nobody reads. The interesting part is, which machines are not up to date. This is my proposal: instead of

WARNING: 5 VMs - 1 Installed,running and current. - 0 Installed,running,but the 
installed version is known to have a grave bug and should be immediately 
upgraded - 3 Installed,running,version is not current - 0 Installed,running,
supported and newer than theversion available on the host - 0 Installed,running,
supported, but a newer version is available - 0 Installed,running,but the version 
is known to be too new  too new to work correctly with this virtual machine - 
0 Installed,running,but the version is too old - 0 Installed,running,but not managed 
by VMWare - 0 Tools starting - 0 Tools not running - 1 Tools not installed - 0 No
 information about VMware tools available. - 0 Powered off. Tools not running - 
0 Suspended. Tools not running
vCenter Installed,running and current.
linux01 Installed,running,version is not current.
VM linux02 Tools not installed.
linux03 Installed,running,version is not current.
linux04 Installed,running,version is not current.

do the following:

WARNING: 5 VMs checked for VMWare Tools state, 4 are not OK.
VM linux01: Installed,running,version is not current.
VM linux02: Tools not installed.
VM linux03: Installed,running,version is not current.
VM linux04: Installed,running,version is not current.
simonmeggle commented 9 years ago

Additionally, I would propose to output (in the 2nd part) only VM names which are NOK. See 2nd example, VM "vCenter" is not printed out.

simonmeggle commented 9 years ago

I also added "VM " in front of each VM.

BaldMansMojo commented 9 years ago

Rewrote your code. The short message is taken for the complete datacenter check and as header for the detailed check. The detailed check s formatted better now. By default now only machines with tool problems will be listed. If you wanna have all use new option --showall. Stati with no machines in them will not be listed. Please test.

Regards - Martin