Website URL Monitor Questions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Website URL Monitor Questions

Post by vornado »

Hello.

I understand that with a Website URL Monitor, you can specify a string to search for in the content of the web page. So, for example, if it is configured to search for the word 'True' and a match is found, the status will be OK. If not, it will be 'Warning' or 'Critical'? (I haven't tested this yet)

Is it possible to do something a little more complex? We would like to be able to look for a return code in the page such as 2000, 3000, 4000, etc., and perhaps get OK for 2000, Warning for 3000 or Critical for 4000.

I'm not sure it matters, but the page we're monitoring currently returns XML:

Code: Select all

<LOGINRESULT>
        <SUCCESS>true/false</SUCCESS>
        <RETURNCODE>2000/3000/4000</RETURNCODE>
        <RETURNMSG>message</RETURNMSG>
</LOGINRESULT>
SUCCESS is true or false
RETURNCODE is 2000, 3000 or 4000
RETURNMSG is one of the following:

Code: Select all

RETURNCODE: 2000   RETURNMSG: "Success" (User found in DB as well as logged into blue)                
RETURNCODE: 3000   RETURNMSG: "Failed to get user from EPMCOMM" (Failed to find user in database)
RETURNCODE: 4000   RETURNMSG: "Failed to get Process ID"  (Failed to login to blue)
Thank you.

Steve
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Website URL Monitor Questions

Post by scottwilkerson »

vornado wrote:Is it possible to do something a little more complex?
Yes absolutely, but I don't know of a plugin that does this out of the box.

Enter the power of Nagios. You (or someone on your staff) can create your own plugins that do exactly what you accomplish, written in any language that can be run from the Linux command line

Here are the Nagios Plugin Development Guidelines

Code: Select all

https://nagios-plugins.org/doc/guidelines.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked