You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tom Haddon <to...@greenleaftech.net> on 2007/06/14 20:54:24 UTC

[users@httpd] Monitoring apache's mod_proxy_balancer

Hi Folks,

We've recently set up mod_proxy_balancer as a replacement for Pound, and
I'm trying to work out the best way to monitor the load balancer to
determine which servers are "in the loop" and which servers are "out of
the loop". I'd ideally like to tie this in to Nagios so that I can get
alerts if any of my servers gets taken out of the loop.

At the moment I have the balancer-manager admin interface enabled for
local connections only (i.e. from 127.0.0.1 on my apache server) and
password protected, and have implemented something like the following
for my Nagios check:

command[check_beta_lb_1]=/usr/lib/nagios/plugins/check_http -H localhost
-u /balancer-manager -a betaload:--password-- -s
'http://--dest-ip--:--dest-port--</a></td><td></td><td></td><td>1</td><td>Ok'

This seems like a terrible hack, and I'm wondering if there's a better
way to do this.

Thanks, Tom
-- 
Tom Haddon <to...@greenleaftech.net>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Monitoring apache's mod_proxy_balancer

Posted by Tom Haddon <to...@greenleaftech.net>.
On Thu, 2007-06-14 at 14:12 -0600, Serge Dubrouski wrote:
> On 6/14/07, Tom Haddon <to...@greenleaftech.net> wrote:
> > On Thu, 2007-06-14 at 13:02 -0600, Serge Dubrouski wrote:
> > > I wouldn't rely on balancer_manager for a such monitoring because I've
> > > seen situations when it reported "Ok" status for workers that were
> > > down.
> >
> > Is that a known bug?
> 
> I haven't seen any bugs reported for this in Bugzilla.

I've been able to replicate myself and have reported it as:

http://issues.apache.org/bugzilla/show_bug.cgi?id=42667

It's not quite the same issue but amounts to the same thing - in my case
I can see that the worker says it's been disabled, but I can verify that
traffic is being passed to my application server...

Thanks, Tom

> 
> >
> > >
> > > As alternative method you can use sniffing Apache error_log file for
> > > the messages about disabled workers. You can OSSEC for that for
> > > example.
> >
> > Is there any way of getting the current status (which workers are in and
> > out) reliably, as this would surely rely on a good known state and then
> > playing things forward from there? I've been seeing some messages in the
> > error logs about workers being disabled, but when I test them they are
> > plainly working fine, and there's no message about the workers being
> > brought back into the loop.
> 
> Not that I know about. I monitor all downstream servers that I have
> configured in load balancer and load balancer itself using Nagios. It
> would be good to be able to make sure that Apache uses all those
> downstream  server but I don't a simple way to do that. One way could
> be monitoring for incoming traffic/growing log files on those servers.
> 
> >
> > Thanks, Tom
> >
> > >
> > > On 6/14/07, Tom Haddon <to...@greenleaftech.net> wrote:
> > > > Hi Folks,
> > > >
> > > > We've recently set up mod_proxy_balancer as a replacement for Pound, and
> > > > I'm trying to work out the best way to monitor the load balancer to
> > > > determine which servers are "in the loop" and which servers are "out of
> > > > the loop". I'd ideally like to tie this in to Nagios so that I can get
> > > > alerts if any of my servers gets taken out of the loop.
> > > >
> > > > At the moment I have the balancer-manager admin interface enabled for
> > > > local connections only (i.e. from 127.0.0.1 on my apache server) and
> > > > password protected, and have implemented something like the following
> > > > for my Nagios check:
> > > >
> > > > command[check_beta_lb_1]=/usr/lib/nagios/plugins/check_http -H localhost
> > > > -u /balancer-manager -a betaload:--password-- -s
> > > > 'http://--dest-ip--:--dest-port--</a></td><td></td><td></td><td>1</td><td>Ok'
> > > >
> > > > This seems like a terrible hack, and I'm wondering if there's a better
> > > > way to do this.
> > > >
> > > > Thanks, Tom
> > > > --
> > > > Tom Haddon <to...@greenleaftech.net>
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> >
> > --
> >
> >
> > ----------------------------------
> > Tom Haddon
> > mailto:tom@greenleaftech.net
> > m +1.415.871.4180
> > www.greenleaftech.net
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 


----------------------------------
Tom Haddon
mailto:tom@greenleaftech.net
m +1.415.871.4180
www.greenleaftech.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Monitoring apache's mod_proxy_balancer

Posted by Serge Dubrouski <se...@gmail.com>.
On 6/14/07, Tom Haddon <to...@greenleaftech.net> wrote:
> On Thu, 2007-06-14 at 13:02 -0600, Serge Dubrouski wrote:
> > I wouldn't rely on balancer_manager for a such monitoring because I've
> > seen situations when it reported "Ok" status for workers that were
> > down.
>
> Is that a known bug?

I haven't seen any bugs reported for this in Bugzilla.

>
> >
> > As alternative method you can use sniffing Apache error_log file for
> > the messages about disabled workers. You can OSSEC for that for
> > example.
>
> Is there any way of getting the current status (which workers are in and
> out) reliably, as this would surely rely on a good known state and then
> playing things forward from there? I've been seeing some messages in the
> error logs about workers being disabled, but when I test them they are
> plainly working fine, and there's no message about the workers being
> brought back into the loop.

Not that I know about. I monitor all downstream servers that I have
configured in load balancer and load balancer itself using Nagios. It
would be good to be able to make sure that Apache uses all those
downstream  server but I don't a simple way to do that. One way could
be monitoring for incoming traffic/growing log files on those servers.

>
> Thanks, Tom
>
> >
> > On 6/14/07, Tom Haddon <to...@greenleaftech.net> wrote:
> > > Hi Folks,
> > >
> > > We've recently set up mod_proxy_balancer as a replacement for Pound, and
> > > I'm trying to work out the best way to monitor the load balancer to
> > > determine which servers are "in the loop" and which servers are "out of
> > > the loop". I'd ideally like to tie this in to Nagios so that I can get
> > > alerts if any of my servers gets taken out of the loop.
> > >
> > > At the moment I have the balancer-manager admin interface enabled for
> > > local connections only (i.e. from 127.0.0.1 on my apache server) and
> > > password protected, and have implemented something like the following
> > > for my Nagios check:
> > >
> > > command[check_beta_lb_1]=/usr/lib/nagios/plugins/check_http -H localhost
> > > -u /balancer-manager -a betaload:--password-- -s
> > > 'http://--dest-ip--:--dest-port--</a></td><td></td><td></td><td>1</td><td>Ok'
> > >
> > > This seems like a terrible hack, and I'm wondering if there's a better
> > > way to do this.
> > >
> > > Thanks, Tom
> > > --
> > > Tom Haddon <to...@greenleaftech.net>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> --
>
>
> ----------------------------------
> Tom Haddon
> mailto:tom@greenleaftech.net
> m +1.415.871.4180
> www.greenleaftech.net
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Monitoring apache's mod_proxy_balancer

Posted by Tom Haddon <to...@greenleaftech.net>.
On Thu, 2007-06-14 at 13:02 -0600, Serge Dubrouski wrote:
> I wouldn't rely on balancer_manager for a such monitoring because I've
> seen situations when it reported "Ok" status for workers that were
> down.

Is that a known bug? 

> 
> As alternative method you can use sniffing Apache error_log file for
> the messages about disabled workers. You can OSSEC for that for
> example.

Is there any way of getting the current status (which workers are in and
out) reliably, as this would surely rely on a good known state and then
playing things forward from there? I've been seeing some messages in the
error logs about workers being disabled, but when I test them they are
plainly working fine, and there's no message about the workers being
brought back into the loop.

Thanks, Tom

> 
> On 6/14/07, Tom Haddon <to...@greenleaftech.net> wrote:
> > Hi Folks,
> >
> > We've recently set up mod_proxy_balancer as a replacement for Pound, and
> > I'm trying to work out the best way to monitor the load balancer to
> > determine which servers are "in the loop" and which servers are "out of
> > the loop". I'd ideally like to tie this in to Nagios so that I can get
> > alerts if any of my servers gets taken out of the loop.
> >
> > At the moment I have the balancer-manager admin interface enabled for
> > local connections only (i.e. from 127.0.0.1 on my apache server) and
> > password protected, and have implemented something like the following
> > for my Nagios check:
> >
> > command[check_beta_lb_1]=/usr/lib/nagios/plugins/check_http -H localhost
> > -u /balancer-manager -a betaload:--password-- -s
> > 'http://--dest-ip--:--dest-port--</a></td><td></td><td></td><td>1</td><td>Ok'
> >
> > This seems like a terrible hack, and I'm wondering if there's a better
> > way to do this.
> >
> > Thanks, Tom
> > --
> > Tom Haddon <to...@greenleaftech.net>
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 


----------------------------------
Tom Haddon
mailto:tom@greenleaftech.net
m +1.415.871.4180
www.greenleaftech.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Monitoring apache's mod_proxy_balancer

Posted by Serge Dubrouski <se...@gmail.com>.
I wouldn't rely on balancer_manager for a such monitoring because I've
seen situations when it reported "Ok" status for workers that were
down.

As alternative method you can use sniffing Apache error_log file for
the messages about disabled workers. You can OSSEC for that for
example.

On 6/14/07, Tom Haddon <to...@greenleaftech.net> wrote:
> Hi Folks,
>
> We've recently set up mod_proxy_balancer as a replacement for Pound, and
> I'm trying to work out the best way to monitor the load balancer to
> determine which servers are "in the loop" and which servers are "out of
> the loop". I'd ideally like to tie this in to Nagios so that I can get
> alerts if any of my servers gets taken out of the loop.
>
> At the moment I have the balancer-manager admin interface enabled for
> local connections only (i.e. from 127.0.0.1 on my apache server) and
> password protected, and have implemented something like the following
> for my Nagios check:
>
> command[check_beta_lb_1]=/usr/lib/nagios/plugins/check_http -H localhost
> -u /balancer-manager -a betaload:--password-- -s
> 'http://--dest-ip--:--dest-port--</a></td><td></td><td></td><td>1</td><td>Ok'
>
> This seems like a terrible hack, and I'm wondering if there's a better
> way to do this.
>
> Thanks, Tom
> --
> Tom Haddon <to...@greenleaftech.net>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org