Page 1 of 3

Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Mon Feb 29, 2016 5:53 pm
by rahul5028
I have created Nagios virtual Instance on Amazon Ec2 Cloud enviorment according to steps given below URL:

https://assets.nagios.com/downloads/nag ... -Cloud.pdf

After that I have Installed NSClient++ on windows Server the one which I have to monitor using Nagios EC2 Instance but its showing Socket Time out error for all monitored services in NagiosXI dashboard[ Note: Firewall turned off on windows server so there is no chance to block ports]

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Mon Feb 29, 2016 6:02 pm
by Box293
In the Amazon management interface you need to open the network ports for it to work.

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Mon Feb 29, 2016 6:14 pm
by rahul5028
Following two ports already opened on AWS but still its giving socket timeout error:

Custom TCP Rule TCP 12489 0.0.0.0/0
Custom TCP Rule TCP 5666 0.0.0.0/0

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Mon Feb 29, 2016 6:28 pm
by Box293
rahul5028 wrote:Following two ports already opened on AWS but still its giving socket timeout error:

Custom TCP Rule TCP 12489 0.0.0.0/0
Custom TCP Rule TCP 5666 0.0.0.0/0
Is this on the windows server in the EC2 instance?

Can you provide your nsclient.ini file from the Windows server.

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Mon Feb 29, 2016 8:45 pm
by rahul5028
Hi,

Just to give more info, I have open TCP ports on Nagios EC2 Instance to communicate with our local windows server(Note:This windows server is running locally in my company and only Nagios Instance running on Amazon AWS)

Also please find attached nsclient.ini file from the Windows server.

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Tue Mar 01, 2016 10:10 am
by rkennedy
I don't see any listening ports in your config, what is the output of netstat -an | findstr "5666" on the windows machine?

Also - have you enabled the rules through Windows firewall?

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Tue Mar 01, 2016 10:47 am
by rahul5028
Here is the output of netstat -an | findstr "5666"(Refer attached screenshot).

Also my windows firewall turned-off , Do we still require to enable the rule through windows firewall.

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Tue Mar 01, 2016 11:27 am
by rkennedy
Can you also run netstat -an | findstr "12489"?

Are your services attempting to use check_nrpe or check_nt?

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Tue Mar 01, 2016 12:07 pm
by rahul5028
Here is the output of netstat -an | findstr "12489".


I'm not sure which one(check_nrpe,check_nt) my service attempting to use, Can you give some steps to check this?

Re: Socket Time Out error in the Amazon Ec2 Cloud Instance.

Posted: Tue Mar 01, 2016 3:45 pm
by rkennedy
Looks good regarding listening, I don't think your nsclient configuration is an issue.

To figure out what service you're using navigate to Configure -> Core Config Manager -> Click 'Services' on the left side, and search for the service in question.

You should see a page similar to this -
ccm-service.PNG
One more thing to check, from the nagios machine, on the CLI can you run nmap windowsip? (replace windowsip with the IP for the windows machine we're trying to check)