(Return code of 125 is out of bounds)

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.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

(Return code of 125 is out of bounds)

Post 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?
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

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

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

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

Post by Box293 »

I am helping you through email, probably best not to continue to post here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

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

Post by kwhogster »

close this as resolved

Thank you
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

Post by bwallace »

Appreciate the update - closing this one out now.
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked