Page 1 of 2
box_293, Plugin unable to retrieve datastores information
Posted: Mon Dec 12, 2016 4:37 am
by jyoti22
Hi box_293,
box293_check_vmware.pl is unable to retrieve any datastore details from vCenter. I am getting the message "No datastores found", where as the hosts details can be retrieved. But not datastores
I logged into vcenter home->inventory->datastores and clusters, and I can see many datastores present
Thanks,
Jyoti
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Mon Dec 12, 2016 10:41 am
by rkennedy
Please show us the command definitions, and service definitions that are related to this, so we can see how you're using the plugin.
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Wed Dec 14, 2016 1:50 am
by jyoti22
Hi,
Please find screenshots of service definition and command definition of datastores
Thanks,
Jyoti
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Wed Dec 14, 2016 12:54 pm
by tgriep
It looks like it is a permission issue for the vi-admin account.
I found this explanation from the manual for the plugin.
Plugin fails to find objects such as Datastores
It has been observed that in some instances the plugin cannot locate datastores. For example:
Command:
• ./box293_check_vmware.pl --server vcenter.box293.local --check Datastore_Usage --name VOL_01
Output:
• UNKNOWN: Datastore 'VOL_01' not found
The problem is with the permissions that have been applied in the vSphere Client. For some reason assigning
the permissions at the top level of “Inventory > Hosts and Clusters” is not enough. You need to also assign the
permissions at the top level of “Inventory > Datastores and Datastore Clusters”.
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Thu Dec 15, 2016 6:30 am
by jyoti22
The permissions are in place.
We checked it.
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Thu Dec 15, 2016 10:35 am
by rkennedy
Could you show us how they're set? It sounds like everything for this part is working properly otherwise.
The only part that would stop VMWare from polling the information is if the information is not presented on a query.
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Mon Dec 19, 2016 5:09 am
by jyoti22
we use the service account that has read permissions on the top of the vcenter tree.
on VMA we have vi-admin account.
we use the below commands to add the service account for vcenter and do the plugin test. the below commands works fine
configure vma credentials for connecting to vcenter/esx
****************************************************************
vi-admin@vma:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server xx.xx.xx.xx--username "serviceaccount" --password "pwd"
Checking vcenter version from VMA
**************************************
vi-admin@vma:~> ~/box293_check_vmware.pl --server xx.xx.xx.xx --check vCenter_Name_Version
Plugin test from Nagios Host
*************************************
[nagios@Nagiosxi ~]$ /usr/local/nagios/libexec/check_by_ssh -E –t 30 1 -l vi-admin -H xx.xx.xx.xx -C "~/box293_check_vmware.pl --server xx.xx.xx.xx --check vCenter_Name_Version"
please give us the command to check if all permissions are in place.
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Mon Dec 19, 2016 1:56 pm
by tgriep
Another thing to try is to login to the vCenter server using the vi-admin username and password and see if you can see the datastores and the details of them using the VMWare Client.
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Tue Dec 20, 2016 12:51 am
by jyoti22
I am unable to login to vcenter with vi-admin credentials from vcenter client. PFA
Re: box_293, Plugin unable to retrieve datastores informatio
Posted: Tue Dec 20, 2016 10:11 am
by monit_burb
HI,
I have those checks installed and running fine. The only difference is that I don't have the --concurrent_checks option but the rest is the same. You can also test running the check manually from the vma command line