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-esx-soap-host-storage-path Custom attribute not working #144

Closed fonz-i closed 5 years ago

fonz-i commented 5 years ago

Icinga2-2.8.4 SDK 6.5.0 ESXi 6.7

I want to monitor esxi storage paths and alert when a path is detected as down. The service check works, but what's annoying is im getting WARNING alerts when an ESXi host is in Maintenance Mode....

"Storage_Paths on esxihost1.domain is WARNING! Info: Notice: esxihost1.domain is in maintenance mode, check skipped"

The Custom Attribute "vmware_ignorewarning = true" doesnt appear to work, unless im doing something wrong, i wouldnt be surprised but would appreciate the help.

services.conf looks like this.......... apply Service "Storage_Paths" { import "esxi-service" check_command = "vmware-esx-soap-host-storage-path" vars.vmware_authfile = "/etc/icinga2/conf.d/esxi" vars.vmware_alertonly = true vars.vmware_ignoreunknown = true vars.vmware_ignorewarning = true

assign where host.vars.os == "esxi" }

BaldMansMojo commented 5 years ago

Yep. That's ok. I've ddoesn't much last time because I was very short on time and I had no SDK 6.5. Now I have it and will merge all pull requests. That didn't make sense for me because without SDK 6.x I couldn't test it.

But back to yopur issue. The warning was hard coded to remind admins that the system is in maintenance mode. We had it here that VMware systems with VMs only for testing were forgotten in maintenance mode. I will modify that with next release.

fonz-i commented 5 years ago

@BaldMansMojo Thanks very much for your response and confirming this. That would be great if its in the next release!

Question, is it the same case for "vmware_ignoreunknown = true" ?

BaldMansMojo commented 5 years ago

This is fixed in latest release. You can map maintenance mode to whatever you want. Default is unknown because you definetely do not know anything.

Regards Martin