What is URL Content Regular Expression Match ?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

What is URL Content Regular Expression Match ?

Post by dlukinski »

URL Content Regular Expression Match
Monitors the URL to ensure the specified regular expression is found in the content of the web page. A content mismatch may indicate that your website has experienced a security breach or is not functioning correctly.

- what is it exactly to enter?
- say if we are using nagios.org page ?

Do we check content before or after login?
- would be a different message in this case
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: What is URL Content Regular Expression Match ?

Post by rkennedy »

Code: Select all

./check_http -H nagios.com -f follow -R 'Keep your network'
This looks at the web page nagios.com, and for the string 'Keep your network'. It will only work for a login that is basic auth and you would append it as -a username:password.
Former Nagios Employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: What is URL Content Regular Expression Match ?

Post by eloyd »

If you want to check content prior to logging in, don't pass the -a authentication information. If you want to check content after logging in, then use it.

Note that this will NOT work with "username" and "password" fields that are part of forms on a web page. For instance, a bank page login is typically an interface to a web application and the username/password information is entered as fields on a page. Unless you can pass that information as GET parameters on the URL (which is VERY insecure) then this plugin will not allow you to check for content that is behind an authentication wall.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: What is URL Content Regular Expression Match ?

Post by dlukinski »

eloyd wrote:If you want to check content prior to logging in, don't pass the -a authentication information. If you want to check content after logging in, then use it.

Note that this will NOT work with "username" and "password" fields that are part of forms on a web page. For instance, a bank page login is typically an interface to a web application and the username/password information is entered as fields on a page. Unless you can pass that information as GET parameters on the URL (which is VERY insecure) then this plugin will not allow you to check for content that is behind an authentication wall.
Is there any other way to pass authentication?
- specifically when Single-Sign-Ons are used?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: What is URL Content Regular Expression Match ?

Post by eloyd »

You may be able to use webinject to do what you need. http://www.webinject.org/plugin.html
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: What is URL Content Regular Expression Match ?

Post by rkennedy »

Thanks @eloyd!

@dlukinski - are we good to mark this thread as resolved?
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: What is URL Content Regular Expression Match ?

Post by dlukinski »

rkennedy wrote:Thanks @eloyd!

@dlukinski - are we good to mark this thread as resolved?

Thank you.

Problem is not resolved, but answers clarified some things for me.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: What is URL Content Regular Expression Match ?

Post by ssax »

Is it okay if I lock this up? The webinject stuff will be what you're looking for and you have a few posts open on that.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: What is URL Content Regular Expression Match ?

Post by dlukinski »

ssax wrote:Is it okay if I lock this up? The webinject stuff will be what you're looking for and you have a few posts open on that.

Yes please
Locked