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
Solved

How to monitor web sites properly via Nagios

Posted on 2010-08-19
6
658 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
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

792 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