On Tue, Jan 20, 2009 at 07:43:25PM +0800, Unai Rodriguez wrote:
> How about writing a bash script that checks LDAP status somehow and have 
>  this script managed by xinetd?
> 
> The script should return "HTTP/1.1 200 OK\r\n" if the LDAP server is 
> fine or something else if not (e.g. "HTTP/1.1 503 Service Unavailable\r\n").
> 
> Xinetd could be configured in such a way that the script is invoked upon 
> connecting to a defined port, let's say 9200.
> 
> Then, we could have on the HAProxy configuration something like this:
> 
> listen  LDAP IP:389
>         mode    tcp
>       option  httpchk
>         server  ldap_srv1 ip:389 check port 9200 inter 5000 rise 3 fall 3
> 
> What would you think of that approach?

it is the usual way of performing complex checks. An alternative
method consists in referencing the LDAP script itself in inetd.

Willy


Reply via email to