Page 1 of 3
URL monitoring issue
Posted: Wed Feb 06, 2019 6:06 am
by RIDS_I2MP
Hello Team,
We have to monitor one URL which can only be accessed from two terminal servers. Those terminal servers are being monitored in Nagios.
Terminal server 1 IP : 10.148.141.196
Terminal server 2 IP : 10.148.141.197
We tried monitoring that URL from Nagios XI server but we are getting below error:
"Name or service not known
HTTP CRITICAL - Unable to open TCP socket"
URL:
http://merch.ricoh-ecommerce-utility.com/atg/bcc
Kindly, look into the issue and let us know what needs to be done from our end to monitor the URL.
Re: URL monitoring issue
Posted: Wed Feb 06, 2019 6:07 am
by RIDS_I2MP
Hi Team,
Posting the error again:
"Name or service not known
HTTP CRITICAL - Unable to open TCP socket"
Re: URL monitoring issue
Posted: Wed Feb 06, 2019 4:11 pm
by ssax
That's likely because the XI server doesn't have a DNS entry for it:
Code: Select all
nslookup merch.ricoh-ecommerce-utility.com
But if the terminal servers are the only ones that can access that site you'll need to set it up differently to achieve the desired results. There are a number of methods I can think of to achieve this (if I'm understanding you properly) but let's get some clarification first:
Are the terminal servers Windows, Unix/Linux, or some other OS?
You're trying to have the XI server reach out to the terminal servers and then have the terminal servers check the website, correct? So like this?
The methods I'm thinking of would be like this:
- Note: Either way you would need to install an agent such as nsclient/nrpe/ncpa to run the scripts remotely
- check_http listed can either be the compiled check_http plugin or some other script that checks it but it would reside on the terminal servers and be called through an agent and return the results to the XI server
Code: Select all
XI -> check_by_ssh -> Terminal Server -> check_http -> Website
OR
Code: Select all
XI -> check_nrpe -> Terminal Server -> check_http -> Website
OR
Code: Select all
XI -> check_ncpa -> Terminal Server -> check_http -> Website
Re: URL monitoring issue
Posted: Thu Feb 07, 2019 1:51 am
by RIDS_I2MP
Hello,
Thanks for the reply!!!
I ran this command in Nagios XI and found that the DNS entry is missing.
[nagios@eu2napu003 ~]$ nslookup merch.ricoh-ecommerce-utility.com
Server: 10.147.108.14
Address: 10.147.108.14#53
** server can't find merch.ricoh-ecommerce-utility.com: NXDOMAIN
To answer your question, Yes the terminal servers are Windows servers.
=>You're trying to have the XI server reach out to the terminal servers and then have the terminal servers check the website, correct?
Yes you are correct.
We want to follow below method:
XI -> check_nrpe -> Terminal Server -> check_http -> Website
Note : NSC++ is already installed on both the terminal servers and we monitoring those servers from our Nagios XI servers.
Please let us know how we can get it done.
Re: URL monitoring issue
Posted: Thu Feb 07, 2019 3:24 pm
by npolovenko
@RIDS_I2MP, You could use this script:
https://exchange.nagios.org/directory/P ... pe/details
It's the equivalent of the check_http but for windows. In the nsclient.ini file insert the following command:
Then you can run it through nrpe on the XI server:
Untitled.png
Re: URL monitoring issue
Posted: Fri Feb 08, 2019 1:07 am
by RIDS_I2MP
Hello,
Thanks for providing the solution.
I am not clear about where and how this plugin should be used.
https://exchange.nagios.org/directory/P ... pe/details
I mean, I should download it in the Terminal server (Windows server) and in Nagios XI server too?
If yes, where exactly in Windows server it should be kept, I mean in which path/location?
What I have understood is, after downloading the script, we need to make changes in nsc.ini file and then try execution the command. Please let me know if I am wrong here.
Request you to explain the step by step process.
Thanks in advance!!!
Re: URL monitoring issue
Posted: Fri Feb 08, 2019 12:05 pm
by npolovenko
@RIDS_I2MP, No need to copy the plugin on the XI server. Download the .exe plugin on the windows server and put it in the following folder:
C:\Program Files\NSClient++\scripts
Open the nsclient.ini file located in C:\Program Files\NSClient++\ ,find this section [/settings/external scripts/scripts] and add the following command underneath:
Where
http://www.google.com is the address to your website.
Save the nsclient.ini file. Then on the windows server open the "Services menu". Once you open the menu, find the NSCLient++ service, right click on it and select "restart".
Finally, establish an ssh session to the nagios XI server using PUTTY and run the following command:
/usr/local/nagios/libexec/check_nrpe -H 192.168.3.145 -c check_http
Replace 192.168.3.145 with the windows server IP address.
Re: URL monitoring issue
Posted: Mon Feb 11, 2019 5:44 am
by RIDS_I2MP
Hello,
Thanks a lot for providing detailed steps!!
We have made the changes as per your suggestion. But we are getting below error:
[nagios@eu2napu002 libexec]$ /usr/local/nagios/libexec/check_nrpe -H 10.147.108.197 -c check_http_nrpe
http://merch.ricoh-ecommerce-utility.com/atg/bcc
CHECK_NRPE: Socket timeout after 10 seconds.
[nagios@eu2napu002 libexec]$
[nagios@eu2napu002 libexec]$ /usr/local/nagios/libexec/check_nrpe -H 10.147.108.197 -c check_http
CHECK_NRPE: Socket timeout after 10 seconds.
[nagios@eu2napu002 libexec]$
I am attaching the nsc.ini config file here, if in case we have missed out anything, please check it.
NSC++ client version: NSCP-0.5.2.35-x643
Windows server IP : 10.147.108.197
URL:
http://merch.ricoh-ecommerce-utility.com/atg/bcc
Please let me know if you need any other information.
Re: URL monitoring issue
Posted: Mon Feb 11, 2019 11:40 am
by npolovenko
@RIDS_I2MP, The .ini file did not get attached unfortunately. Can you try again?
Re: URL monitoring issue
Posted: Mon Feb 11, 2019 10:44 pm
by RIDS_I2MP
Hi,
PFA the nsc.ini file.