glenn
October 17, 2016, 11:18am
1
Hello, I have a healthcheck that requires a POST of xml in the body. I can run the below curl command and it works… but the question is how do I code this into the haproxy.cfg file?
curl -v mywebserver/wfc/XmlService -H “Content-Type: application/xml” -d "<?xml version='1.0'?><Kronos_WFC version='1.0'><Request Object='System' Action='Logon' Username='myuser' Password='mypass'/><Request Action='RetrieveResponseTime' retrieveFor='pingWithDB'><HeartBeat/></Request><Request Object='System' Action='Logoff'/></Kronos_WFC>"
glenn
October 18, 2016, 5:47am
2
Hi,
Managed to find a solution. Content-Length had to be exact…
option httpchk POST /wfc/XmlService HTTP/1.1\r\nHost:\ myserver.com\r\nContent-Type:\ text/xml\r\nContent-Length:\ 276\r\n\r\n<?xml\ version="1.0"?><Kronos_WFC\ version="1.0"><Request\ Object="System"\ Action="Logon"\ Username="myuser"\ Password="mypass"/><Request\ Action="RetrieveResponseTime"\ retrieveFor="pingWithDB"><HeartBeat/></Request><Request\ Object="System"\ Action="Logoff"/></Kronos_WFC>
rhall
January 28, 2021, 3:54pm
3
Ended up here googling to do exactly the same thing with the same system. Thank you for documenting!