Not able to add server in nagios and getting error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Not able to add server in nagios and getting error

Post by HAL »

We need to monitor the DA services on this server and the default IPv4 port pool that is reserved for DA communication is from 6001 to 47000.
Port 12489 which is the default port for NSClient++ falls in the range of 6001 to 47000. Please suggest me any port which can be used instead of 12489.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Not able to add server in nagios and getting error

Post by lmiltchev »

You can try using a port outside the 6001 to 47000 range. I didn't find much info on the topic in the nsclient++ documentation.

Note: NSClient++ was not developed and it is not maintained by us (Nagios).

I tried using port 5000 and it seemed to work fine. I changed the following line in the nsclient.ini file from this:

Code: Select all

port = 12489
to this:

Code: Select all

port = 5000
and restarted the NSClient++ service so that changes can take effect. Next, I tested it from the CLI:

Code: Select all

/usr/local/nagios/libexec/check_nt -H x.x.x.x -s password -p 5000 -v CLIENTVERSION
NSClient++ 0.4.3.147 2015-10-18
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Not able to add server in nagios and getting error

Post by HAL »

Hi,

I did what you said. I changed NSClient Port Number from 12489 to 5000 but still getting the error "Critical-Socket Time Out after 10 seconds."
Also, I gave command nrpe -p 5000 <serverIP> on nagios server and found out that port 5000 is getting used for serive upnp.
Please advise.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to add server in nagios and getting error

Post by rkennedy »

Can you try using a port that isn't in use on the windows server and trying NRPE with the same?
Former Nagios Employee
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Not able to add server in nagios and getting error

Post by HAL »

Hi,
I have now added the server in monitoring using NRPE. Thank You.! :)
Now I am trying to add service "Remote Access Management Service" on the same server. I selected "check_nrpe" in check command and I have command view "$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$". When I put the service name RaMgmtSvc in $ARG1$ field, I received the error : UNKNOWN: No handler for that command.
Please guide.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to add server in nagios and getting error

Post by rkennedy »

Do you have a command defined for RaMgmtSvc?

Can you post your nsclient configuration file?
Former Nagios Employee
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Not able to add server in nagios and getting error

Post by HAL »

No, I do not have command specified for RaMgmtSvc. Please tell me where I can get the nsclient configuration file.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to add server in nagios and getting error

Post by rkennedy »

Try changing your $ARG1$ to check_service, and your $ARG2$ to -a "service=RaMgmtSvc"

That should work, I was able to test on my own local machine like so -

Code: Select all

[root@suse11 libexec]# ./check_nrpe -H 192.168.5.47 -c check_service -a "service=BranchCache"
OK: All 1 service(s) are ok.
Former Nagios Employee
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Not able to add server in nagios and getting error

Post by HAL »

I have successfully added the service now. Thank you so much for your help. :)
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Not able to add server in nagios and getting error

Post by bwallace »

Glad we were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked