Monitoring Esxi host on nagios

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

Re: Monitoring Esxi host on nagios

Post by Box293 »

Can you also show us your service definition.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vinothg
Posts: 15
Joined: Mon Aug 17, 2015 3:55 pm

Re: Monitoring Esxi host on nagios

Post by vinothg »

Hi,

The below is the service definition
The below is the service definition

define service {
host_name hostname.mbrdi.com
service_description Host Cpu Usage
check_command box293_check_vmware.pl --check Host_CPU_Usage --server (vcenter ip) --host (esxi host name) --warning cpu_used:2 --critical cpu_used:10
initial_state u
max_check_attempts 3
check_interval 5
retry_interval 3
active_checks_enabled 1
check_period 24x7
register 1
}
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring Esxi host on nagios

Post by Box293 »

There are multiple issues here.

First is that you are not referencing the check_command correctly, it should be box293_check_vmware not box293_check_vmware.pl (in a service you don't directly reference the plugin filename, you reference the command definition name).

Then when you use a command, the ! exclamation marks separate the $ARGx$ values. You haven't done this and you haven't matched up the correct arguments with the correct values.

What you need in your service definition is:

Code: Select all

check_command box293_check_vmware!(vcenter ip)!Host_CPU_Usage!--host!(esxi host name)!--warning!cpu_used:2!--critical!cpu_used:10
Does this make sense?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
vinothg
Posts: 15
Joined: Mon Aug 17, 2015 3:55 pm

Re: Monitoring Esxi host on nagios

Post by vinothg »

Hi,

Thanks for assisting on this i will check based on your comments.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring Esxi host on nagios

Post by hsmith »

Let us know what you come up with.

Thanks!
Former Nagios Employee.
me.
Locked