Solved

How to monitor web sites properly via Nagios

Posted on 2010-08-19
6
664 Views
Last Modified: 2012-05-10
Hi Experts,

We have an issue with Nagios at the moment attempting to monitor Web sites.

Nagios reports as ok if port 80 is open - if the site is parked, Nagios wouldn't know.

Is there a better solution to check if the website is down or changed?

Can you monitor a particular picture or text in the site?

Perhaps a more powerful plugin is available?

Please help...
Thanks!
0
Comment
Question by:bossagroup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 12

Assisted Solution

by:hfraser
hfraser earned 333 total points
ID: 33481765
The check_http plugin allows you to search the content for a specific string (--string) or regular expression (--regex or --eregi). If the site is a secure site (SSL), you can check for a valid certificate. Finally, you can check to see if the page is re-directed.
0
 

Author Comment

by:bossagroup
ID: 33481774
so can a specific string be a image on the webpage?

If so can you please show me the command to use?
0
 
LVL 12

Assisted Solution

by:hfraser
hfraser earned 333 total points
ID: 33482090
The check_http command can look for any string in the content of a web page. For example, the command:

check_http --string "Welcome to my site" mywebsite.,com -u welcome.html

would check for the string "Welcome to my web site" on http://mywebsite.com/welcome.html

This plugin is designed to search the entire content of a web page (including mime-encoded image files) for a specific string, but not well suited to tell if the web page has changed in any way. If you want to do this, you could do a simple check to see if the page size has changed (check_http -m min:max) or write a simple script to compare an md5 hash of the image file.

0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 9

Accepted Solution

by:
jeremycrussell earned 167 total points
ID: 33485605
To add to hfraser's response... To check for an image, just use the --string reponse and check for the image path/name

i.e  check_http -H host --string "/path/to/images/image.jpg"
0
 
LVL 12

Expert Comment

by:hfraser
ID: 33488140
Checking for a change to a link to an included image file isn't the same as checking for a change to the image file itself (ie. it's a different image). But it depends upon what you want to check.
0
 

Author Closing Comment

by:bossagroup
ID: 33527534
Thanks guys,

Exactly what I was after!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question