Discussion:
SOAP service healthcheck
Māra Grīnberga
2018-12-06 07:28:28 UTC
Permalink
Hi,

I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to the
server. I've read about this option:
option httpchk GET /check
http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to this
"/check" service?

Any suggestions and help would be appreciated!

Best regards,
Mara
Bruno Henc
2018-12-06 07:50:43 UTC
Permalink
Hello,


One option is to implement a sidecar/watchdog service which queries the
SOAP service directly and exposes a /check URI that HAProxy can use for
the http-check.


I'm not sure if there's a direct way to POST data to the http check, I
will let you know if I find one.


Hope this helps.


Best regards,


Bruno Henc
Post by Māra Grīnberga
Hi,
I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to
       option httpchk GET /check
        http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to
this "/check" service?
Any suggestions and help would be appreciated!
Best regards,
Mara
Jarno Huuskonen
2018-12-06 08:04:49 UTC
Permalink
Hi,
Post by Māra Grīnberga
I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to the
option httpchk GET /check
http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to this
"/check" service?
Do you mean POST to /check where post body is the SOAP envelope ?
Post by Māra Grīnberga
Any suggestions and help would be appreciated!
I think you can (ab)use http version to send body with option httpchk
(https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20httpchk)

One example for sending xml post:
https://discourse.haproxy.org/t/healthcheck-with-xml-post-in-body/733

-Jarno
--
Jarno Huuskonen
Māra Grīnberga
2018-12-06 08:08:12 UTC
Permalink
Hi,

Yes, I do.

m.
Post by Jarno Huuskonen
Hi,
Post by Māra Grīnberga
I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to the
option httpchk GET /check
http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to
this
Post by Māra Grīnberga
"/check" service?
Do you mean POST to /check where post body is the SOAP envelope ?
Post by Māra Grīnberga
Any suggestions and help would be appreciated!
I think you can (ab)use http version to send body with option httpchk
(
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20httpchk
)
https://discourse.haproxy.org/t/healthcheck-with-xml-post-in-body/733
-Jarno
--
Jarno Huuskonen
Māra Grīnberga
2018-12-06 08:09:10 UTC
Permalink
I mean, thanks! I'll look into it!

Mara
Post by Jarno Huuskonen
Hi,
Post by Māra Grīnberga
I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to the
option httpchk GET /check
http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to
this
Post by Māra Grīnberga
"/check" service?
Do you mean POST to /check where post body is the SOAP envelope ?
Post by Māra Grīnberga
Any suggestions and help would be appreciated!
I think you can (ab)use http version to send body with option httpchk
(
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20httpchk
)
https://discourse.haproxy.org/t/healthcheck-with-xml-post-in-body/733
-Jarno
--
Jarno Huuskonen
Baptiste
2018-12-07 21:59:52 UTC
Permalink
Hi,

You can also forge a http post with the tcp-check. This would be less hacky.

Baptiste
Post by Māra Grīnberga
I mean, thanks! I'll look into it!
Mara
Post by Jarno Huuskonen
Hi,
Post by Māra Grīnberga
I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to
the
Post by Māra Grīnberga
option httpchk GET /check
http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to
this
Post by Māra Grīnberga
"/check" service?
Do you mean POST to /check where post body is the SOAP envelope ?
Post by Māra Grīnberga
Any suggestions and help would be appreciated!
I think you can (ab)use http version to send body with option httpchk
(
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20httpchk
)
https://discourse.haproxy.org/t/healthcheck-with-xml-post-in-body/733
-Jarno
--
Jarno Huuskonen
Christopher Cox
2018-12-07 22:17:57 UTC
Permalink
tcp-check is what we used for this.
Post by Baptiste
Hi,
You can also forge a http post with the tcp-check. This would be less hacky.
Baptiste
I mean, thanks! I'll look into it!
Mara
Hi,
Post by Māra Grīnberga
I'm new to Haproxy and I've a task for which I can't seem to
find a
Post by Māra Grīnberga
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending
requests to the
Post by Māra Grīnberga
        option httpchk GET /check
         http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP
envelope to this
Post by Māra Grīnberga
"/check" service?
Do you mean POST to /check where post body is the SOAP envelope ?
Post by Māra Grīnberga
Any suggestions and help would be appreciated!
I think you can (ab)use http version to send body with option httpchk
(https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20httpchk)
https://discourse.haproxy.org/t/healthcheck-with-xml-post-in-body/733
-Jarno
--
Jarno Huuskonen
Māra Grīnberga
2018-12-07 23:08:50 UTC
Permalink
Thanks for the tip!

Mara
Post by Baptiste
Hi,
You can also forge a http post with the tcp-check. This would be less hacky.
Baptiste
Post by Māra Grīnberga
I mean, thanks! I'll look into it!
Mara
Post by Jarno Huuskonen
Hi,
Post by Māra Grīnberga
I'm new to Haproxy and I've a task for which I can't seem to find a
solution online. Probably, I'm not looking in the right places.
I need to check if a SOAP service responds before sending requests to
the
Post by Māra Grīnberga
option httpchk GET /check
http-check expect string OK
I think, it's what I need. But is there a way to pass SOAP envelope to
this
Post by Māra Grīnberga
"/check" service?
Do you mean POST to /check where post body is the SOAP envelope ?
Post by Māra Grīnberga
Any suggestions and help would be appreciated!
I think you can (ab)use http version to send body with option httpchk
(
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20httpchk
)
https://discourse.haproxy.org/t/healthcheck-with-xml-post-in-body/733
-Jarno
--
Jarno Huuskonen
Loading...