Monitoring a matrix of load-balanced VirtualHosts?
JB Segal
jailbait at gmail.com
Mon Aug 29 23:34:12 CEST 2005
On 8/29/05, Marc Powell <marc at ena.com> wrote:
>
>
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> > admin at lists.sourceforge.net] On Behalf Of JB Segal
> > Sent: Monday, August 29, 2005 3:09 PM
> > To: Nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] Monitoring a matrix of load-balanced
> VirtualHosts?
> >
> > Hi. I've searched through the archives, the nagiosexchange site, and
> > google in general, but have yet to find a satisfactory answer to this:
> >
> > I'm running (ok, my employer is running and has been for a while now)
> > 1.2, talking to a variety of machines running various vintages of
> > RedHat and various versions of nrpe and the plugins package.
> >
> > I have a series of web servers - call them A, B and C - which are
> > running apache, which is serving a variety of VirtualHosts - let's
> > call them foo.com, bar.com and baz.com.
> >
> > Each machine responds to both www.(foo|bar|baz).com and
> > {hostname}.(foo|bar|baz).com (say: A.foo.com)
> >
> > I need to check each server for the aliveness of each VHost.
> >
> > I really am not sure how best to do this. Ok, I'm not really sure how
> > to do this in any sort of clean fashion.
> >
> > I would expect this to be a common need, but I seem to be wrong.
> >
> > Help, Advice, Pointers to things I missed in TFM, etc. all welcome.
>
> Perhaps I'm misunderstanding, but have you looked at check_http? It
> should be able to easily handle what you want using the -H, -I, -e and
> possibly -u arguments. Each machine would have at least 3 (or 6 if you
> want to also check host.foo.com) services associated with it;
> Website_foo.com, Website_bar.com and Website_baz.com, each of which uses
> check_http to verify the site is active and returning content you
> expect.
>
> --
> Marc
To start with, thanks for responding.
2nd: I left out from my 1st mail the fact that I'd really really
prefer to do this in as few cfg stanzas as possible, as 1) I'd like
this solution to scale if, say, we were to end up with 20 webservers
and 45 domains - I /do/ have to check host.foo.com per boss's reqests
- so I'd love to not have to add another {number of websites} stanzas
for each new server.
2) I just cleaned up the previous admin's installation and reduced
3000 lines of cfg to 800 lines, and I'd love to not have to expand
back to that again right now.
So, not to sound like a complete idiot - but probably unable to avoid
it, I continue my query:
I've spent a while (before I sent my 1st mail, even) staring at the
check_http -h output and being... nonplussed. Unfortunately, that's
been my response to most of the nagios docs.
Your response puzzles me even more, by implying that the '-u' might be optional.
I'll keep poking around, but if you have any suggestions - example cfg
stanzas would be great - of how to put this together (especially if
you can think of a way to put together a generalized service{} stanza
so that I can A) just add a new domain one place, and B) just add the
new host to the right hostgroup and have it all Do The Right Thing.)
(No need to do my whole job for me, really. If you get so motivated,
though... ;)
Thanks!
JB
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list