Page 1 of 2

NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 2:19 pm
by stecino
Hello,

I am having a problem with monitoring the host, I get host unknown error

on the VMA server I run the following command which executes fine

vi-admin@pbur2vma1:~> ./box293_check_vmware.pl --check Datastore_Usage --server 10.xx.x.xxx --name "SBUR-DS01" --username xxxx
OK: Datastore 'SBUR-DS01' {Free Space: 17,281.5 GB} {Used Space: 13,894.5 GB} {Capacity: 31,176 GB}|'Free Space'=17281.5GB 'Used Space'=13894.5GB 'Capacity'=31176GB [Datastore_Usage]

This is the problem

vi-admin@pbur2vma1:~> ./box293_check_vmware.pl --check Datastore_Performance --server 10.xx.x.xxx --host 10.xx.x.yyy --name "SBUR-DS01" --username xxxx
UNKNOWN: Host '10.xx.x.yyy' not found [Datastore_Performance]

Thanks in advance

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 3:03 pm
by lgroschen
From the manual, here, there is an example:

Example 1:
box293_check_vmware.pl --check Datastore_Performance --server 192.168.1.211 --host
192.168.1.210 --name "ESXi 5.1"
Output for Example 1:
OK: Datastore 'ESXi 5.1' {Rate (Read:32 kBps / 21%)(Write:122 kBps / 79%)} {Number of
(Reads:20) (Writes:109)} {Latency (Read:0 ms)(Write:1 ms)}|'Read Rate'=32kBps 'Write
Rate'=122kBps 'Number of Reads'=20 'Number of Writes'=109 'Read Latency'=0ms 'Write
Latency'=1ms

Are you sure that the --host is
--host (the host that the datastore is connected to)
Can you verify the IP is correct? It may be different from the server.

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 4:53 pm
by stecino
lgroschen wrote:From the manual, here, there is an example:

Example 1:
box293_check_vmware.pl --check Datastore_Performance --server 192.168.1.211 --host
192.168.1.210 --name "ESXi 5.1"
Output for Example 1:
OK: Datastore 'ESXi 5.1' {Rate (Read:32 kBps / 21%)(Write:122 kBps / 79%)} {Number of
(Reads:20) (Writes:109)} {Latency (Read:0 ms)(Write:1 ms)}|'Read Rate'=32kBps 'Write
Rate'=122kBps 'Number of Reads'=20 'Number of Writes'=109 'Read Latency'=0ms 'Write
Latency'=1ms

Are you sure that the --host is
--host (the host that the datastore is connected to)
Can you verify the IP is correct? It may be different from the server.
Yes, in VWare Client, I select the datastore, and selected the hosts tab to list all the ESX hosts that are connected to that datastore

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 7:10 pm
by Box293
The --host value needs to match the name of the host as it appears in the vSphere client.

For example, if your host appears as esx55_01.domain.local then you must type:

--host esx55_01.domain.local

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 7:38 pm
by stecino
Box293 wrote:The --host value needs to match the name of the host as it appears in the vSphere client.

For example, if your host appears as esx55_01.domain.local then you must type:

--host esx55_01.domain.local

So here is what I did:

./credstore_admin.pl add -server esxi316.xxxxx.com -username nagios -password xxxxxxx

./box293_check_vmware.pl --check Datastore_Performance --server 10.xx.x.xxx --host esxi316.xxxxxx.com --name "SBUR-DS01" --username nagios
Undefined subroutine &HostNasVolume::extent called at ./box293_check_vmware.pl line 1982

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 7:57 pm
by Box293
Do you have a vcenter server?

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 8:31 pm
by stecino
Box293 wrote:Do you have a vcenter server?
yes

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Mon Nov 10, 2014 9:07 pm
by Box293
OK so you don't need to add the credentials for the ESXi server as vCenter handles all this.

Can you run the command again on the vMA but this time add the --debug argument at the end.

Code: Select all

./box293_check_vmware.pl --check Datastore_Performance --server 10.xx.x.xxx --host esxi316.xxxxxx.com --name "SBUR-DS01" --username nagios --debug
This will create the file /home/vi-admin/box293_check_vmware_debug_log.txt
Please PM me that file and I'll investigate some more.

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Tue Nov 11, 2014 2:03 pm
by stecino
Box293 wrote:OK so you don't need to add the credentials for the ESXi server as vCenter handles all this.

Can you run the command again on the vMA but this time add the --debug argument at the end.

Code: Select all

./box293_check_vmware.pl --check Datastore_Performance --server 10.xx.x.xxx --host esxi316.xxxxxx.com --name "SBUR-DS01" --username nagios --debug
This will create the file /home/vi-admin/box293_check_vmware_debug_log.txt
Please PM me that file and I'll investigate some more.
Thanks alot, I will run it shortly and send you the log

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Posted: Tue Nov 11, 2014 2:11 pm
by slansing
Great! Let us know!