Monitoring multiple sites on a single server using OpsView

Posted by Kev on Server Fault See other posts from Server Fault or by Kev
Published on 2011-03-20T17:58:02Z Indexed on 2011/03/20 19:23 UTC
Read the original article Hit count: 356

We have several web servers. On each of these servers there can be ~250 web sites. I need to add a HTTP check for each site on each server. Each site has a reserved host header that we know can always be resolved in the format of:

w10000.hostchecks.mycompany.com  
w10020.hostchecks.mycompany.com  
w11992.hostchecks.mycompany.com  
..and so on..

What I want is for there to be a master ping check on the web server's main IP address and then separate HTTP checks for each of the sites on the server. If the master ping test fails then I want the HTTP tests to cease until the master ping check goes OK.

I had a stab at this and tried do the following:

  1. Create a parent host that does a ping check on the server's main ip address (e.g. server is named WEB0001).
  2. For each of the sites that reside on WEB0001:

    • Create a separate Host with a Primary Hostname of wXXXXX.hostchecks.mycompany.com
    • Make WEB0001 the parent host
    • Add a monitor (HTTP check to a special url that is mapped into each site using a virtual directory:

      H- $HOSTADDRESS$ -u /__hostcheck/IsAlive.aspx -w 5 -c 10 -p 80

However I find that if I down the parent server (WEB0001) the http checks seem to continue.

Am I going about this completely the wrong way?

© Server Fault or respective owner

Related posts about monitoring

Related posts about nagios