Page 1 of 1

Server port must be an integer

Posted: Fri Dec 20, 2013 5:35 am
by nottheadmin
Hello, I'm having a bit of trouble connecting to nsclient++.

I'm using the NagiosXI VM appliance / 2.6.32-358.2.1.el6.i686

Things are pretty much working except for check_nt and check_nrpe which is frustrating as I can't see what is wrong.

I have the agent installed on a number of windows servers.

Nagios reports that the hosts are down but really it is the check_nt that is not working.

From the xi web interface >configure > hosts > test check command

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_nt -H 10.99.40.3 -p $USER7$ -s $USER8$ -v  
OUTPUT: Server port must be an integer
If i run this command manually in a shell it works

Code: Select all

root@localhost libexec# ./check_nt -H 10.99.40.3 -p 12489 -v CLIENTVERSION
NSClient++ 0,4,1,90 2013-02-04
So the $USER7$ variable seems to be not working. I foolishly through that I could edit commands.cfg to just replace the variable with the port number, needless to say this did not work and I have reverted back to the original commands.cfg file.

I may have missed a setting somwhere in the web interface asking for the port number?

Re: Server port must be an integer

Posted: Fri Dec 20, 2013 10:54 am
by abrist
nottheadmin wrote:From the xi web interface >configure > hosts > test check command
$USERn$ macros do not work with the test check command. What is the error you get in the status detail for the service (home --> service detail --> search for service) instead of the test check command?

Re: Server port must be an integer

Posted: Sun Dec 22, 2013 9:16 am
by nottheadmin
Hey, Thanks for your reply. I'm unable to test that right now, in another country with no access but i'll be getting back on this in a couple of weeks.

Until then, have a nice christmas and new year :D

Re: Server port must be an integer

Posted: Mon Dec 23, 2013 10:46 am
by slansing
You too! Let us know.

Re: Server port must be an integer

Posted: Thu Jan 16, 2014 7:10 am
by nottheadmin
Hi again, I'm back to getting this working now so if it's not too much trouble i'd really appreciate your help.

In the Host Status Detail page, over view tab it say's

(No output returned from host check)

and goes on to list the help output of the check_nrpe command.

Again, I am able to run the command manually from a terminal, which indicates that the client and communication is working just fine.

I'm in the process of buying a license and then deploying this in the field so it would be great to put this to bed.

Any help appreciated
Thanks

Re: Server port must be an integer

Posted: Thu Jan 16, 2014 10:37 am
by slansing
Hmm, something may be a bit goofy in the service/command definition then, can you navigate to Configure > CCM > Services > "Click the diskette icon next to the service name of one of the services you are having issues with." And then do this for the check_nrpe command under CCM > Commands as well. Please post the output from those two here, thanks!

Re: Server port must be an integer

Posted: Fri Jan 17, 2014 4:19 am
by nottheadmin
Strange, I just noticed that it is using check_nrpe but I have it set to use check_nt?

Image

Anyway, here is the info from configure>ccm>services>diskette icon.

Notes, I have replaced the first 4 characters of the hostname with xxxx in on this posts for some security, it's not edited on the actual nagios server, just here.

###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2014-01-17 04:11:30
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define service {
host_name xxxxITXDC02
service_description LDAP
use xiwizard_tcp_service
check_command check_xi_service_tcp!-p 389
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

define service {
host_name xxxxITXDC02
service_description NetBIOS
use xiwizard_tcp_service
check_command check_xi_service_tcp!-p 139
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

define service {
host_name xxxxITXDC02
service_description Ping
use xiwizard_genericnetdevice_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

define service {
host_name xxxxITXDC02
service_description RDP
use xiwizard_tcp_service
check_command check_xi_service_tcp!-p 3389
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################

Re: Server port must be an integer

Posted: Fri Jan 17, 2014 4:25 am
by nottheadmin
right, hang on, i've just noticed that I have duplicate hosts in my list, that last posts was for a version of this host that appears to be working properly.

Let me try and remove the duplicates somehow and narrow this down a little.

Re: Server port must be an integer

Posted: Fri Jan 17, 2014 12:51 pm
by slansing
Awesome, once you find the correct one let us know!

Re: Server port must be an integer

Posted: Thu Feb 13, 2014 7:55 am
by nottheadmin
Apologies for the late reply, Unfortunately I was not able to migrate this vmware player image to an esx server and have had to start again with the Vspehere appliance.

I'm now encountering a whole new set of problems! :)

In terms of this problem here, I have no clue why I had duplicates and why some incorrect scripts were being called for monitoring.

I'll start a new thread and we may as well close this one.