server port must be an integer

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.
jatinder2jatin
Posts: 7
Joined: Tue Feb 23, 2016 5:26 am

server port must be an integer

Post 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
Attachments
windows.cfg
(3.91 KiB) Downloaded 486 times
commands.cfg
(7.52 KiB) Downloaded 511 times
nagios.png
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: server port must be an integer

Post 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.
Rob Hassing
Image
jatinder2jatin
Posts: 7
Joined: Tue Feb 23, 2016 5:26 am

Re: server port must be an integer

Post 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.
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: server port must be an integer

Post 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]
Rob Hassing
Image
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: server port must be an integer

Post 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.
Rob Hassing
Image
jatinder2jatin
Posts: 7
Joined: Tue Feb 23, 2016 5:26 am

Re: server port must be an integer

Post 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
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: server port must be an integer

Post by rhassing »

Do you have the nsclient installed on the server you are trying to monitor?
Rob Hassing
Image
jatinder2jatin
Posts: 7
Joined: Tue Feb 23, 2016 5:26 am

Re: server port must be an integer

Post by jatinder2jatin »

yes complete package installed and configured as instructed in the manuals
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: server port must be an integer

Post by rkennedy »

Try changing it to 12489.
Former Nagios Employee
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: server port must be an integer

Post 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?
Rob Hassing
Image
Locked