Page 1 of 1

(Return code of 125 is out of bounds)

Posted: Sun Jul 31, 2016 2:09 pm
by kwhogster
Nagios Core 4.1.1 on Ubuntu Server 16.04.1
I have a vMA Host 6.0
ESXi Host 6.0

Just added box293_check_vmware plugin

built a vMA Host all seems ok

When I created a new cfg file VMware.cfg with my host and guests defined

I created a new command in my commands.cfg file

Code: Select all

define command {
	command_name box293_check_vmware
	command_line $USER1$/check_by_ssh -E 1 -t 90 -l vi-admin -H 10.2.8.7 -C "nice -n19~/box293_check_vmware.pl --server $ARG1$ --check $ARG2$ \"$ARG3$\" \"$ARG4$\" \"$ARG5$\" \"$ARG6$\" \"$ARG7$\" \"$ARG8$\""
}
I added to the nagios.cfg

Code: Select all

# BOX293 config settings
cfg_file=/usr/local/nagios/etc/objects/vmware.cfg
a sample of my VMware.cfg

Code: Select all

#  Define HOST
define host{
        use             windows-server  ; Inherit default values from a template
        host_name       ESXIHOSTVM      ; The name we're giving to this host
        alias           ESXi 6.0	; A longer name associated with the host
        address         10.2.8.10       ; IP address of the host
        }
# 	Host OS Name and Version
define service {
	host_name ESXIHOSTVM
	service_description ESXi Version
	check_command box293_check_vmware!$HOSTADDRESS$!Host_OS_Name_Version!!!!!!
	initial_state u
	max_check_attempts 3
#	check_interval 1440
	check_interval 10
	retry_interval 7
	active_checks_enabled 1
	check_period 24x7
	register 1
}
#	Host Storage Adapter Performance
define service {
	host_name ESXIHOSTVM
	service_description HBA Performance - vmhba1
	check_command box293_check_vmware!$HOSTADDRESS$!Host_Storage_Adapter_Performance!--name!vmhba1!!!!
	initial_state u
	max_check_attempts 3
	check_interval 5
	retry_interval 3
	active_checks_enabled 1
	check_period 24x7
	register 1
}
#	Guest CPU Usage
define service {
	host_name SERV014
	service_description Guest CPU Usage
	check_command box293_check_vmware!10.2.8.21!Guest_CPU_Usage!--guest!FileServer!!!!
	initial_state u
	max_check_attempts 3
	check_interval 5
	retry_interval 3
	active_checks_enabled 1
	check_period 24x7
	register 1
}
define service {
	host_name SERV015
	service_description Guest CPU Usage
	check_command box293_check_vmware!10.2.8.22!Guest_CPU_Usage!--guest!FileServer!!!!
	initial_state u
	max_check_attempts 3
	check_interval 5
	retry_interval 3
	active_checks_enabled 1
	check_period 24x7
	register 1
}
Why am I getting (Return code of 125 is out of bounds) on all my service definitions?

Re: (Return code of 125 is out of bounds)

Posted: Sun Jul 31, 2016 7:59 pm
by kwhogster
box293 replied to my email

he found this error in my command.cfg file

define command {
command_name box293_check_vmware
command_line $USER1$/check_by_ssh -E 1 -t 90 -l vi-admin -H 10.2.8.7 -C "nice -n19~/box293_check_vmware.pl --server $ARG1$ --check $ARG2$ \"$ARG3$\" \"$ARG4$\" \"$ARG5$\" \"$ARG6$\" \"$ARG7$\" \"$ARG8$\""
}


should be like this
define command {
command_name box293_check_vmware
command_line $USER1$/check_by_ssh -E 1 -t 90 -l vi-admin -H 10.2.8.7 -C "nice -n19 ~/box293_check_vmware.pl --server $ARG1$ --check $ARG2$ \"$ARG3$\" \"$ARG4$\" \"$ARG5$\" \"$ARG6$\" \"$ARG7$\" \"$ARG8$\""
}


no space -n19~ need to be -n19 ~

Now the (Return code of 125 is out of bounds) is gone

Now just have a warning

Enter username: Error :: Invalid argument specified


Thoughts

Re: (Return code of 125 is out of bounds)

Posted: Sun Jul 31, 2016 8:35 pm
by Box293
I am helping you through email, probably best not to continue to post here.

Re: (Return code of 125 is out of bounds)

Posted: Mon Aug 22, 2016 7:46 pm
by kwhogster
close this as resolved

Thank you

Re: (Return code of 125 is out of bounds)

Posted: Tue Aug 23, 2016 9:37 am
by bwallace
Appreciate the update - closing this one out now.