Page 3 of 3
Re: Monitoring Esxi host on nagios
Posted: Mon Oct 12, 2015 7:10 pm
by Box293
Can you also show us your service definition.
Re: Monitoring Esxi host on nagios
Posted: Mon Oct 12, 2015 7:25 pm
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
}
Re: Monitoring Esxi host on nagios
Posted: Mon Oct 12, 2015 7:35 pm
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?
Re: Monitoring Esxi host on nagios
Posted: Mon Oct 12, 2015 9:05 pm
by vinothg
Hi,
Thanks for assisting on this i will check based on your comments.
Re: Monitoring Esxi host on nagios
Posted: Tue Oct 13, 2015 9:29 am
by hsmith
Let us know what you come up with.
Thanks!