URL monitoring issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

URL monitoring issue

Post 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.
Thanks & Regards,
I2MP Team.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: URL monitoring issue

Post by RIDS_I2MP »

Hi Team,

Posting the error again:

"Name or service not known
HTTP CRITICAL - Unable to open TCP socket"
Thanks & Regards,
I2MP Team.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: URL monitoring issue

Post 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?

Code: Select all

XI -> Terminal Server -> Website
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
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: URL monitoring issue

Post 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.
Thanks & Regards,
I2MP Team.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: URL monitoring issue

Post 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:
[/settings/external scripts/scripts]

check_http = scripts\check_http_nrpe.exe http://www.google.com
Then you can run it through nrpe on the XI server:
./check_nrpe -H 192.168.3.145 -c check_http http://www.google.com
302 Found HTTP/1.1 - 231 bytes
Untitled.png
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: URL monitoring issue

Post 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!!!
Thanks & Regards,
I2MP Team.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: URL monitoring issue

Post 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:
check_http = scripts\check_http_nrpe.exe http://www.google.com
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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: URL monitoring issue

Post 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.
Thanks & Regards,
I2MP Team.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: URL monitoring issue

Post by npolovenko »

@RIDS_I2MP, The .ini file did not get attached unfortunately. Can you try again?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: URL monitoring issue

Post by RIDS_I2MP »

Hi,

PFA the nsc.ini file.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
Locked