> I was thinking of updating the ldap-check but I think I've a better idea.
> Macros (well ish).
>
>   send-binary 300c0201 # LDAP bind request "<ROOT>" simple
>   send-binary 01 # message ID
>   send-binary 6007 # protocol Op
>   send-binary 0201 # bind request
>   send-binary 03 # LDAP v3
>   send-binary 04008000 # name, simple authentication
>   expect binary 0a0100 # bind response + result code: success
>   send-binary 30050201034200 # unbind request
>
> could be in a file named macros/ldap-simple-bind
>
> then the option
>  tcp-check-macro ldap-simple-bind
>
> would use it, I know this is close to includes.
>
> similarly macros/smtp-helo-quit
>          connect port 25
>          expect rstring ^220
>          send QUIT\r\n
>          expect rstring ^221
>
>
> or from
> http://blog.haproxy.com/2014/06/06/binary-health-check-with-haproxy-1-5-php-fpmfastcgi-probe-example/
> # FCGI_BEGIN_REQUEST
>  send-binary   01 # version
>  send-binary   01 # FCGI_BEGIN_REQUEST
>  send-binary 0001 # request id
>  send-binary 0008 # content length
>  send-binary   00 # padding length
>  send-binary   00 #
>  send-binary 0001 # FCGI responder
>  send-binary 0000 # flags
>  send-binary 0000 #
>  send-binary 0000 #
>  # FCGI_PARAMS
>  send-binary   01 # version
>  send-binary   04 # FCGI_PARAMS
>  send-binary 0001 # request id
>  send-binary 0045 # content length
>  send-binary   03 # padding length: padding for content % 8 = 0
>  send-binary   00 #
>  send-binary 0e03524551554553545f4d4554484f44474554 # REQUEST_METHOD = GET
>  send-binary 0b055343524950545f4e414d452f70696e67   # SCRIPT_NAME = /ping
>  send-binary 0f055343524950545f46494c454e414d452f70696e67 # SCRIPT_FILENAME
> = /ping
>  send-binary 040455534552524F4F54 # USER = ROOT
>  send-binary 000000 # padding
>  # FCGI_PARAMS
>  send-binary   01 # version
>  send-binary   04 # FCGI_PARAMS
>  send-binary 0001 # request id
>  send-binary 0000 # content length
>  send-binary   00 # padding length: padding for content % 8 = 0
>  send-binary   00 #
>
>  expect binary 706f6e67 # pong
>
> (though for items like
> send-binary 0e03524551554553545f4d4554484f44474554 # REQUEST_METHOD = GET
> I'd prefer a
> send-as-binary "REQUEST_METHOD = GET"
> )
>
> these and many others could be shipped with haproxy.
>
> this seems to make sense to me as they are small contained logical items
>
> Neil
>

Hi Neil,

Both contributions are interresting!
Let's wait for other people feedback.

Baptiste

Reply via email to