services.cfg ... HELP!

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
gru
Posts: 2
Joined: Mon Jan 30, 2017 4:53 pm

services.cfg ... HELP!

Post by gru »

I am trying to monitor a service on a new "host" server, unsuccessfully. I've copied, and modified, a hosts entry in the hosts.cfg and the same for services.cfg. The new host entry is working correctly and my ping entry in services.cfg is OK too. I'm also trying to monitor a specific service, I have checked with SC that the service name is correct and I have opened up port 12489 both ways. I am getting a "Critical - socket timeout after 10 seconds.

The admin that implemented Nagios included a _HOST_ID in the "hosts.cfg" file, and a _SERVICE_ID in the "services.cfg" file. I cannot find any documentation on either of these _ID entries. In documentation I've found an ID is not listed in the required or optional entries. I have commented out the _SERVICE_ID entry and it doesn't seem to make a difference. I have service ID entry for the ping entry. This paragraph is included so you have all the information I have.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: services.cfg ... HELP!

Post by rkennedy »

Those ID's sounds like a custom variable. Based on the timeout, please run nmap ip.of.machine.timingout and then on teh Windows machine, run netstat -an | findstr 12489 - this will show us the outputs. This will tell us if it's listening properly, or if there is perhaps a firewall in between.

The simply thing it could be, is 10 seconds isn't long enough. In that case, you can just append -t 30 to the command to give it more time to execute.
Former Nagios Employee
gru
Posts: 2
Joined: Mon Jan 30, 2017 4:53 pm

Re: services.cfg ... HELP!

Post by gru »

I installed and ran nmap against the host ip. Then ran nestat for the port which returned nothing.
I increased the time out to 30 then 60, it returned the same error with "after 30" then just "timed out".
Oh, I also commented out the _ID for the ping service on this host, it had no affect one way or the other; so "I" believe the _ID's are inconsequential and a red herring to the solution to this problem.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: services.cfg ... HELP!

Post by rkennedy »

I installed and ran nmap against the host ip. Then ran nestat for the port which returned nothing.
Please show us these results. If the netstat from the windows machine showed it wasn't listening, then that's your answer. You'll need to setup the agent properly - please post the nmap results as well as your nsclient configuration file.
Former Nagios Employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: services.cfg ... HELP!

Post by tmcdonald »

Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up or has the issue otherwise been resolved?
Former Nagios employee
Locked