Thx for the advice Jonathan
Willy's advice from an old post was to make it work with printf+nc in bash first. So I did.

the issue is after I added the lines to the backend(below), the server still resported UP eben if the expected string is not there.

regards
Owen


---------------
backend neo4j-stg
option httpchk POST /db/data/ext/feed/graphdb/userFeed HTTP/1.1\r\nHost: 172.23.10.61:7474\r\nAccept: */*\r\nContent-Type: application/json\r\nContent-Length: 35\r\n\r\n{"userId":8, "offset":0, "limit":1}
        http-check disable-on-404 expect string "userId"
        server neo4j-stg-01 172.23.10.61:7474
        server neo4j-stg-02 172.23.10.62:7474
        balance     roundrobin
--------------------



On 12-11-23 05:01 AM, Jonathan Matthews wrote:
On 22 November 2012 22:14, Owen Marinas <[email protected]> wrote:
option httpchk POST /db/data/ext/feed/graphdb/userFeed
HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length:
35\r\n{"userId":8, "offset":0, "limit":1}\r\n
It might not be related to your original question, but I think you're
missing an extra "\r\n" that should represent the blank line between
the POST's headers and its body.

Also, I think the length of 35 might be wrong, as it doesn't take into
account the last "\r\n" (which might be superfluous anyway).

HTH,
Jonathan


Reply via email to