Page 1 of 1

New vSphere plugin documentation

Posted: Tue Sep 17, 2024 7:44 am
by IT_LAS
Hi,
I've recently updated a Nagios XI instance to the latest version.
I'm in need of some guidance using the new "check_vsphere_xi.py" plugin.
On the previous version, with the "check_vmware_api.pl" plugin I could connect without issues to each of the hosts from a vcenter cluster, but now with the new plugin, it gives this error "CRITICAL: Could not connect to the specified vCenter server.".

I'm testing it executing the following command:

Code: Select all

./check_vsphere_xi.py -H <esxi_ip> -f <authfile_path> -l vmfs
If launch it for the vcenter server there is no problem, but the response is a mess, it shows a list of every host and the datastore it access with it's data, and I cannot filter by the datastore name, or I don't get how to do it.

This is the command I'm testing:

Code: Select all

./check_vsphere_xi.py -H <vcenter_IP> -f <authfile_path> -l vmfs -o <datastore_name>
The plugin's help also does not give many hints on how to filter this type of data.

Re: New vSphere plugin documentation

Posted: Tue Sep 17, 2024 9:57 am
by bbahn
Hello @IT_LAS,

The vsphere plugin does not have a way to filter for filter by datastore name at this time. The closest you can get at the moment is to specify a Datacenter/Cluster/Host/VM and get the datastores for that Datacenter/Cluster/Host/VM.

You can view more documentation by calling the plugin with check_vsphere_xi.py -h. That information should be up to date with the current version of the plugin.

If you like, I can file a feature request for filtering datastores more specifically. Otherwise, you could create a wrapper plugin that calls the plugin and then filters the output.

Re: New vSphere plugin documentation

Posted: Tue Sep 17, 2024 11:03 am
by IT_LAS
Hello @bbahn,
Yes I would appreciate it.
With the above plugin we have configured controls to monitor the space used in each datastore.
The command that was executed was:

Code: Select all

$USER1$/check_vmware_api.pl -H "$HOSTADDRESS$" -f "$_HOSTPASS"  -l "VMFS" -s $SERVICEDESC$ -o used -w 98% -c 99%
The “$SERVICEDESC$” field is used for the name of the Datastore to be monitored.

Re: New vSphere plugin documentation

Posted: Thu Sep 19, 2024 10:46 am
by bbahn
I have created the issue and will begin work on it at the earliest convenience. It should be a pretty simple addition, but my time is occupied for at least the next few months and I will likely not be able to work on it for some time. If you would like to raise the priority of this issue and expedite the process, you can create a case at https://answerhub.nagios.com/support/s/. Otherwise, we do have other paid cases that we have to prioritize first.

Re: New vSphere plugin documentation

Posted: Mon Jan 13, 2025 12:02 pm
by logisbk
When I try monitor a ESXi host using the new vSphere Config Wizard, I can select Monitored Metrics, but when I click on the Datastores tab, I get the error: "CRITICAL: Could not connect to the specified vCenter server." I believe this is the same behavior @IT_LAS is seeing.

The documentation shows that you should be able to do this https://assets.nagios.com/downloads/nag ... Sphere.pdf

This is not a feature request about filtering datastores, the selection of datastores doesn't even show up for a host. If I use the vCenter Server, rather than a single ESXi host, I can see all the datastores. But if I only want to monitor a host and the datastores connected to it?