URL monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

URL monitoring

Post by kalyanpabolu »

Hi Team,

We want to monitor a URL is opening/accessible from a remote machine. In other words, I will open URL from a remote machine and if it is not accessible from that machine, Nagios should send alert.

Is this possible in Nagios?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: URL monitoring

Post by dchurch »

Yes, if you use the Website configuration wizard, it should allow you to check a URL returns a valid response.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

Re: URL monitoring

Post by kalyanpabolu »

Hello,

I checked that Wizard, I do not see any field where it will ask to provide source IP.
How we will come to know that its monitoring the accessibility from a remote server?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: URL monitoring

Post by ssax »

This is possible to do but would need to be done with an agent.

XI > Agent on Remote Host (where the URL check should occur from) > check URL

Is that remote machine a linux/unix or windows system?

Do you currently have an agent installed on that system? If so, which?
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

Re: URL monitoring

Post by kalyanpabolu »

Hello,

It is a Windows machine. We do not have any agent installed currently.
We can proceed and install ncpa agent. Could you please guide us on further steps to monitor the URL?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: URL monitoring

Post by dchurch »

You can run this HTTP check remotely using the Windows machine to complete the request.

1. Download this file to C:\Program Files (x86)\Nagios\NCPA\plugins\check_http.py.
2. Run Command Prompt as administrator. Type this:

Code: Select all

pip3 install requests
3. Enter this into the Nagios XI service:
- Plugin: check_xi_ncpa
- Arg1: -t '<your NCPA community string>' -M 'plugins/check_http.py' -a '<your URL>'
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

Re: URL monitoring

Post by kalyanpabolu »

Hello,

Thanks for the reply!!

We will work on it and get back to you with the updates. Please keep the ticket open.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: URL monitoring

Post by dchurch »

Let us know how that goes.

One final note: The script I linked is specially modified to allow a quoting workaround for NCPA, so you'll want to put quotes around the '<your URL>' string in your arg1. E.g. -a '"https://example.com"' - that's a single quote ('), then a double quote ("), then the URL, then a double quote ("), then a single quote (').
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
kalyanpabolu
Posts: 246
Joined: Fri Jul 03, 2020 4:18 am

Re: URL monitoring

Post by kalyanpabolu »

Hello,

Thank you so much for your support!!
We already started working on the same and we will keep you posted with the updates.

One more thing to add here, if we are checking the URL not from Windows machine but from a router, then how that can be achieved?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: URL monitoring

Post by dchurch »

kalyanpabolu wrote:if we are checking the URL not from Windows machine but from a router, then how that can be achieved?
You mean Nagios contacts the router and asks it to check the router to make an HTTP request? That's not currently possible unless the router supports an API to do that. What model router is it?
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked