Haproxy notifications

2011-09-22 Thread İbrahim Ercan
Hi, I am new haproxy user. I wonder that is there a way to make haproxy send
notifications when a server down or up?
Thank you for interested in...

-- 
*Ibrahim Ercan
*


Re: Haproxy notifications

2011-09-22 Thread Ben Timby
On Thu, Sep 22, 2011 at 10:24 AM, İbrahim Ercan
 wrote:
> Hi, I am new haproxy user. I wonder that is there a way to make haproxy send
> notifications when a server down or up?
> Thank you for interested in...

Hi Ibrahim,

Use Nagios or a similar monitoring tool. These tools can either
monitor your servers directly, or even monitor the server status via
HAProxy using it's web stats interface, or log file etc. Nagios can
then alert via email, sms, etc. You can even configure actions to take
when a server goes down (restart httpd for example).

http://www.nagios.org/

There may be simpler tools more well-suited to your needs, I know of
another named Monit. But my experience is mostly with Nagios.

http://mmonit.com/monit/

The point is that I would look for a monitoring tool to use for sending alerts.



Re: Haproxy notifications

2011-09-22 Thread Guillaume Bourque
Hi,

The nagios script is fine but if you dont have nagios you can start with
this.

If you want to see it in the log

you need to have this in one of the section ( iput in in my default section
)

option  log-health-checks


With this haproxy will log in syslog en event each time a server change
status.

To log in syslog  I use thos two options in the global part of haproxy
config and the server change will end up in th notice section of your syslog

log /dev/log local6 info
log /dev/log local1 notice


Bye


2011/9/22 İbrahim Ercan 

> Hi, I am new haproxy user. I wonder that is there a way to make haproxy
> send notifications when a server down or up?
> Thank you for interested in...
>
> --
> *Ibrahim Ercan
> *
>



-- 
Guillaume Bourque, B.Sc.,
consultant, infrastructures technologiques libres
514 576-7638,  http://ca.linkedin.com/in/GuillaumeBourque/fr


Re: Haproxy notifications

2011-09-22 Thread Ben Timby
On Thu, Sep 22, 2011 at 11:30 AM, Guillaume Bourque
 wrote:
>         option          log-health-checks

:-) I took notification to mean something other than logging.



Re: Haproxy notifications

2011-09-22 Thread carlo flores
Here's an HAProxy ctl/init script that includes Nagios and Cloudkick checks
(to the UNIX socket and lsof listeners) to go with the regular
start/stop/init stuff: https://github.com/flores/haproxyctl

The advantage of using a wrapper around the UNIX socket is you can also add
checks for available backends, hosts down, and so forth.  This should be in
addition to whatever TCP/HTTP checks that come default in any monitoring
solution.

(The script above is easy to edit to add such things.)




On Thu, Sep 22, 2011 at 10:02 AM, Ben Timby  wrote:

> On Thu, Sep 22, 2011 at 11:30 AM, Guillaume Bourque
>  wrote:
> > option  log-health-checks
>
> :-) I took notification to mean something other than logging.
>
>


Re: Haproxy notifications

2011-09-24 Thread İbrahim Ercan
Hi Carlo, I tried to install it but i got that error when run it.

-# service haproxyctl "show health"
/etc/init.d/haproxyctl:17:in `require': no such file to load -- haproxyctl
(LoadError)
from /etc/init.d/haproxyctl:17


On 22 September 2011 21:42, carlo flores  wrote:

> Here's an HAProxy ctl/init script that includes Nagios and Cloudkick checks
> (to the UNIX socket and lsof listeners) to go with the regular
> start/stop/init stuff: https://github.com/flores/haproxyctl
>
> The advantage of using a wrapper around the UNIX socket is you can also add
> checks for available backends, hosts down, and so forth.  This should be in
> addition to whatever TCP/HTTP checks that come default in any monitoring
> solution.
>
> (The script above is easy to edit to add such things.)
>
>
>
>
>
> On Thu, Sep 22, 2011 at 10:02 AM, Ben Timby  wrote:
>
>> On Thu, Sep 22, 2011 at 11:30 AM, Guillaume Bourque
>>  wrote:
>> > option  log-health-checks
>>
>> :-) I took notification to mean something other than logging.
>>
>>
>


-- 
*İbrahim Ercan
* *Gsm: 0 505 608 24 37*


Re: Haproxy notifications

2011-09-24 Thread carlo flores
Hey Ibrahim.  Continued on your GitHub issue!

On Sat, Sep 24, 2011 at 1:25 AM, İbrahim Ercan
wrote:

> Hi Carlo, I tried to install it but i got that error when run it.
>
> -# service haproxyctl "show health"
> /etc/init.d/haproxyctl:17:in `require': no such file to load -- haproxyctl
> (LoadError)
> from /etc/init.d/haproxyctl:17
>
>
>
> On 22 September 2011 21:42, carlo flores  wrote:
>
>> Here's an HAProxy ctl/init script that includes Nagios and Cloudkick
>> checks (to the UNIX socket and lsof listeners) to go with the regular
>> start/stop/init stuff: https://github.com/flores/haproxyctl
>>
>> The advantage of using a wrapper around the UNIX socket is you can also
>> add checks for available backends, hosts down, and so forth.  This should be
>> in addition to whatever TCP/HTTP checks that come default in any monitoring
>> solution.
>>
>> (The script above is easy to edit to add such things.)
>>
>>
>>
>>
>>
>> On Thu, Sep 22, 2011 at 10:02 AM, Ben Timby  wrote:
>>
>>> On Thu, Sep 22, 2011 at 11:30 AM, Guillaume Bourque
>>>  wrote:
>>> > option  log-health-checks
>>>
>>> :-) I took notification to mean something other than logging.
>>>
>>>
>>
>
>
> --
> *İbrahim Ercan
> * *Gsm: 0 505 608 24 37*
>