NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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.
/Luke
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post by Box293 »

Do you have a vcenter server?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post by stecino »

Box293 wrote:Do you have a vcenter server?
yes
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NAGIOS CORE: HOW TO MONITOR HOST ESX 5.5

Post by slansing »

Great! Let us know!
Locked