Forum Discussion
External Monitor with curl command
Hi expert
i want to write script for external monitor as scenario
i have 3 pools with priority group less than 1 that mean only 1 server should accept traffic and the others are standby
the priority group as expected but the development want only 1 pool should up and others mark down by using
if send cookie with expexted respond should be OK and API ACTIVE
how to write this script, send request and respond on the file
Thanks
Hey Agus12,
an "External Monitor" based on external BASH-Scripts is most likely used for rather complex monitoring tasks and should not used for simple monitoring tasks. It would just add unnessecary complexity....
The curl commands your DEVs handed out are looking very simplistic and right now I dont see a good reason to put those CURL commands natively into an external monitoring script. A regular HTTP/HTTPS Monitor with tailordered SEND/RECEIVE strings should be able monitor the availability of your application.
Before helping you to create SEND/RECEIVE strings, you should clarify with your development why they included the -cookie directive and why they enabling the -G option (use GET instead of POST requests) if the -d option uses JSON formated params meant for POST payload. The combination of -G and JSON formated payload results in a slighly broken request URI:
[itacs@kw-f5-dev:Active:Standalone] config # curl -vvv --cookie session_cookie -G -d '{"request":"ping"}' http://10.0.17.23:81 * Trying 10.0.17.23... * Connected to 10.0.17.23 (10.0.17.23) port 81 (#0) > GET /?{"request":"ping"} HTTP/1.1 > Host: 10.0.17.23:81 > User-Agent: curl/7.47.1 > Accept: */* >
Cheers, Kai
Recent Discussions
Related Content
* 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