Health Monitor - POST xml
markcronin
Member ✭
in System
Mark Cronin -- 9/11/2015
Please can you help -
I am trying to create a health script that POSTs an XML request to a server and expects
a 200 OK code back.
Here is the XML reqest
<?xml version="1.0" encoding="utf-8" ?><Request type="Heartbeat"><Field name="ChainCode">191</Field><Field name="PropertyCode">191</Field><Field name="SequenceNumber">228103999</Field></Request>
Here is the XML reply - I used curl with -v option to get output
C:\cURL\bin>curl -v -k --request POST --header "Content-type: text/xml" --data @heartbeat.xml http://10.254.129.19:1011
* Rebuilt URL to: http://10.254.129.19:1011/
* Trying 10.254.129.19...
* Connected to 10.254.129.19 (10.254.129.19) port 1011 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.40.0
> Host: 10.254.129.19:1011
> Accept: */*
> Content-type: text/xml
> Content-Length: 194
>
* upload completely sent off: 194 out of 194 bytes
< HTTP/1.1 200 OK
< Server: Freedompay-Figaro/1.0
< Content-Type: text/html;charset=UTF-8
< Content-Length: 226
< Date: Fri, 11 Sep 2015 17:15:27 GMT
< Connection: close
<
<?xml version="1.0" encoding="UTF-8"?><Response type="Heartbeat"><Field name="ChainCode">191</Field><Field name="PropertyCode">191</Field><Field
name="SequenceNumber">228103999</Field><Field name="Status">ok</Field></Response>* Closing connection 0
Can you please help me convert this in to a A10 health script - I am not sure if we can do this via normal health monitors or if I need to create an external script
Please can you help -
I am trying to create a health script that POSTs an XML request to a server and expects
a 200 OK code back.
Here is the XML reqest
<?xml version="1.0" encoding="utf-8" ?><Request type="Heartbeat"><Field name="ChainCode">191</Field><Field name="PropertyCode">191</Field><Field name="SequenceNumber">228103999</Field></Request>
Here is the XML reply - I used curl with -v option to get output
C:\cURL\bin>curl -v -k --request POST --header "Content-type: text/xml" --data @heartbeat.xml http://10.254.129.19:1011
* Rebuilt URL to: http://10.254.129.19:1011/
* Trying 10.254.129.19...
* Connected to 10.254.129.19 (10.254.129.19) port 1011 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.40.0
> Host: 10.254.129.19:1011
> Accept: */*
> Content-type: text/xml
> Content-Length: 194
>
* upload completely sent off: 194 out of 194 bytes
< HTTP/1.1 200 OK
< Server: Freedompay-Figaro/1.0
< Content-Type: text/html;charset=UTF-8
< Content-Length: 226
< Date: Fri, 11 Sep 2015 17:15:27 GMT
< Connection: close
<
<?xml version="1.0" encoding="UTF-8"?><Response type="Heartbeat"><Field name="ChainCode">191</Field><Field name="PropertyCode">191</Field><Field
name="SequenceNumber">228103999</Field><Field name="Status">ok</Field></Response>* Closing connection 0
Can you please help me convert this in to a A10 health script - I am not sure if we can do this via normal health monitors or if I need to create an external script
0
Comments