Page 1 of 2

server port must be an integer

Posted: Tue Feb 23, 2016 12:25 pm
by jatinder2jatin
sorry admin/ moderator
just realized i have posted my last post in nagios XI and i could not find option to move here

guys i need help with above error.
attached is error screen + windows.cfg and commands.cfg

Re: server port must be an integer

Posted: Tue Feb 23, 2016 12:34 pm
by rhassing
I see your commands.cfg contains the following:

Code: Select all

# 'check_nt' command definition
define command{
	command_name	check_nt
	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p XXXXXXX -v $ARG1$ $ARG2$
	}
The port you specify "XXXXXX" is not realy a port number and should be the port you want to connect to.

Re: server port must be an integer

Posted: Tue Feb 23, 2016 12:37 pm
by jatinder2jatin
hi
that XXXXXXX was my password for the windows client...
i changed it to XXXXX

but you talking about some port.. can you please help


also how can i check if i have check_nt properly installed/configured and is working fine.

Re: server port must be an integer

Posted: Tue Feb 23, 2016 12:42 pm
by rhassing

Code: Select all

Usage:
check_nt -H host -v variable [-p port] [-w warning] [-c critical]
[-l params] [-d SHOWALL] [-u](DEPRECATED) [-t timeout]

Re: server port must be an integer

Posted: Tue Feb 23, 2016 12:43 pm
by rhassing

Code: Select all

Notes:
 - The NSClient service should be running on the server to get any information
   (http://nsclient.ready2run.nl).
 - Critical thresholds should be lower than warning thresholds
 - Default port 1248 is sometimes in use by other services. The error
   output when this happens contains "Cannot map xxxxx to protocol number".
   One fix for this is to change the port to something else on check_nt 
   and on the client service it's connecting to.

Re: server port must be an integer

Posted: Tue Feb 23, 2016 12:50 pm
by jatinder2jatin
hi rob thanks
i changed the -p value to "-p 1248" and now i am having the socket error.. i believe i have done stupid mistake but me being new here not been able to troubleshoot much
greatful if u can help

Re: server port must be an integer

Posted: Tue Feb 23, 2016 1:36 pm
by rhassing
Do you have the nsclient installed on the server you are trying to monitor?

Re: server port must be an integer

Posted: Tue Feb 23, 2016 1:40 pm
by jatinder2jatin
yes complete package installed and configured as instructed in the manuals

Re: server port must be an integer

Posted: Tue Feb 23, 2016 2:19 pm
by rkennedy
Try changing it to 12489.

Re: server port must be an integer

Posted: Tue Feb 23, 2016 2:39 pm
by rhassing
To test if the connectivity is working, you could always try to do a telnet to the server on this port:

Code: Select all

telnet 192.168.0.251 1248 
Or maybe you have a firewall installed on the windows server?