Solved

How to monitor web sites properly via Nagios

Posted on 2010-08-19
6
654 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now