Forum Discussion
PablitoFP
Nimbostratus
Jan 18, 2019Please help with monitor doing a post!!!
Hi guys, I need your help please.
I need to configure a monitor to do a post and get a 204, but it is not working.
If I do a curl like this, I get the http 204 that I am looking:
curl -X POST -sL...
Stanislas_Piro2
Cumulonimbus
Jan 19, 2019Hi,
before writing a monitor, you must know how the request is sent:
POST /api/rest/checks/v0/void HTTP/1.1
Host: 192.168.2.34
Accept: */*
Authorization: Basic ZjUZjjU=
Content-Type: application/json
Content-Length: 12
{"data": ""}
The POST data are always after a blank line without any content
You must replace any new line by
\r\n, and don't add a space before new lines : ZjUZjjU= \r\n is wrong because on the space before \r\n
the monitor string must be :
POST /api/rest/checks/v0/void HTTP/1.1\r\nHost: 192.168.2.34\r\nAccept: */*\r\nAuthorization: Basic ZjUZjjU=\r\nContent-Type: application/json\r\nContent-Length: 12\r\n\r\n{"data": ""}
try first the send string syntax from bigip with this:
SEND_STRING='POST /api/rest/checks/v0/void HTTP/1.1\r\nHost: 192.168.2.34\r\nAccept: */*\r\nAuthorization: Basic ZjUZjjU=\r\nContent-Type: application/json\r\nContent-Length: 12\r\n\r\n{"data": ""}'
(echo -ne $SEND_STRING; cat) | nc 192.168.2.34 80
You can look at this link on how to check monitor syntax and get response data to build monitor receive string.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
