On Fri, Oct 30, 2015 at 12:43 PM, Igor Cicimov <
ig...@encompasscorporation.com> wrote:

>
> On 31/10/2015 3:14 AM, "Daren Sefcik" <dsef...@hightechhigh.org> wrote:
> >
> >
> >
> > On Thu, Oct 29, 2015 at 11:15 PM, Igor Cicimov <
> ig...@encompasscorporation.com> wrote:
> >>
> >>
> >> On 30/10/2015 4:48 PM, "Daren Sefcik" <dsef...@hightechhigh.org> wrote:
> >> >
> >> > So I think those links were the right idea and I have been trying
> different configurations but am not quite there and am hoping somebody can
> offer a bit more guidance.
> >> >
> >> > So when I telnet to the icap server I type in the OPTIONS line
> followed by (2) return key presses and then it returns the ICAP text, below
> is my telent session output
> >> >
> >> > ===================
> >> >
> >> > $ telnet 10.1.4.153 1344
> >> > Trying 10.1.4.153...
> >> > Connected to 10.1.4.153.
> >> > Escape character is '^]'.
> >> > OPTIONS icap://127.0.0.1:1344/respmod ICAP/1.0
> >> >
> >> > ICAP/1.0 200 OK
> >> > ISTAG: "5BDEEEA9-12E4-2"
> >> > Service: Diladele Web Safety 4.2.0.CBF4
> >> > Service-ID: qlproxy
> >> > Methods: RESPMOD
> >> > Options-TTL: 3600
> >> > Max-Connections: 15000
> >> > Allow: 204
> >> > Preview: 4096
> >> > Transfer-Preview: *
> >> > Encapsulated: null-body=0
> >> > Connection: close
> >> >
> >> > ========================
> >> >
> >> >
> >> > Here is what I have tried in the backend configurations
> >> >
> >> > option tcp-check
> >> > tcp-check send OPTIONS\ icap\:\/\/127\.0\.0\.1\:1344\/respmod\
> ICAP\/1\.0\r\n\
> >> > tcp-check send \r\n
> >> > tcp-check expect string ICAP\/1\.0\ 200\ OK
> >> >
> >> >
> >> > but it is still not working, I suspect I need to use some type of
> regex or such. Hoping somebody can help me along with this.
> >> >
> >> > TIA..
> >> >
> >> >
> >> > On Mon, Oct 19, 2015 at 7:42 AM, Daren Sefcik <
> dsef...@hightechhigh.org> wrote:
> >> >>
> >> >> Thanks Jarno, I am still not sure how I can apply this to each
> server using a different port but will poke around at it and see if I can
> figure it out.
> >> >>
> >> >> On Mon, Oct 19, 2015 at 1:04 AM, Jarno Huuskonen <
> jarno.huusko...@uef.fi> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> On Sun, Oct 18, Daren Sefcik wrote:
> >> >>> > I have an ICAP server backend with servers that each listen on
> different
> >> >>> > ports, can anyone offer some advice on how to configure health
> checks for
> >> >>> > it? I am currently using basic but that really doesn't help if
> the service
> >> >>> > is not responding.
> >> >>> >
> >> >>> > Here is my haproxy config for the backend:
> >> >>> >
> >> >>> > backend HTPL_CONT_FILTER_tcp_ipvANY
> >> >>> > mode tcp
> >> >>> > balance roundrobin
> >> >>> > timeout connect 50000
> >> >>> > timeout server 50000
> >> >>> > retries 3
> >> >>> > server HTPL-WEB-01_10.1.4.153 10.1.4.153:1344 check inter 5000
> weight 200
> >> >>> > maxconn 200 fastinter 1000 fall 5
> >> >>> > server HTPL-WEB-02_10.1.4.154 10.1.4.154:1344 check inter 5000
> weight 200
> >> >>> > maxconn 200 fastinter 1000 fall 5
> >> >>> > server HTPL-WEB-02_10.1.4.155_01 10.1.4.155:8102 check inter
> 5000  weight
> >> >>> > 200 maxconn 200 fastinter 1000 fall 5
> >> >>> > server HTPL-WEB-02_10.1.4.155_02 10.1.4.155:8202 check inter
> 5000  weight
> >> >>> > 200 maxconn 200 fastinter 1000 fall 5
> >> >>>
> >> >>> Do the icap servers (squid+diladele?) respond to something like
> this:
> >> >>> https://support.symantec.com/en_US/article.TECH220980.html
> >> >>> or
> https://exchange.icinga.org/oldmonex/1733-check_icap.pl/check_icap.pl
> >> >>>
> >> >>> Maybe you can use tcp-check to send icap request and look for
> >> >>> "ICAP/1.0 200" response:
> >> >>>
> https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#tcp-check%20connect
> >> >>>
> http://blog.haproxy.com/2014/01/02/haproxy-advanced-redis-health-check/
> >> >>>
> >> >>> -Jarno
> >> >>>
> >> >>> --
> >> >>> Jarno Huuskonen
> >> >>
> >> >>
> >> >
> >> Since your telnet session is on port 1344, maybe
> >>
> >> tcp-check connect port 1344
> >>
> >> before the send command.
> >
> > Thank you but each backend server has a different port configured, that
> is just one example.
> >
> >
> > server HTPL-WEB-01_10.1.4.153 10.1.4.153:1344 check inter 5000  weight
> 200 maxconn 200 fastinter 1000 rise 1 fall 5
> > server HTPL-WEB-02_10.1.4.154 10.1.4.154:1344 check inter 5000  weight
> 200 maxconn 200 fastinter 1000 rise 1 fall 5
> > server HTPL-WEB-02-DOCK-02_10.1.4.155_01 10.1.4.155:8102 check inter
> 5000  weight 200 maxconn 200 fastinter 1000 rise 1 fall 5
> > server HTPL-WEB-02-DOCK-02_10.1.4.155_02 10.1.4.155:8202 check inter
> 5000  weight 200 maxconn 200 fastinter 1000 rise 1 fall 5
>
> I see. In that case I would say to try:
>
> tcp-check expect rstring ICAP\/1\.0\ 200\ OK
>
> since the response is multiline and you need regexp as you mentioned.
>


So in the end these lines worked for me, thanks to everyone who helped.

=================
option tcp-check
tcp-check send OPTIONS\ icap\:\/\/127\.0\.0\.1\:1344\/reqmod\
ICAP\/1\.0\r\n\
tcp-check send \r\n
tcp-check send \r\n
tcp-check expect rstring ICAP\/1\.0\ 200\ OK
=================

Reply via email to