Technical Forum
Ask questions. Discover Answers.
Showing results for 
Search instead for 
Did you mean: 

Health Monitor using API token


I am checking a server using an API, using curl it succeeds but it takes two steps. First I request a bearer token by sending username and password, I then recieve a token valid for 300 seconds. I then pass that token to the api page and get a reponse with text I can match against for health monitoring. The API wont accept basic auth unfortunately.

I am a bit stuck as to how I can translate this into a health monitor though, if anyone can help it would be appreciated it. I presume I need an external monitor as there would be no way to pass the token as a variable to my post request right?

here is a basic overview from the cli I have trimmed outputs:


Get a token:

curl -k --request POST --url --data "grant_type=password&username=myusername&password=pass123"

repsonds with:

Send a second request
curl -kH "Authorization: Bearer 123mytoken123" ""

responds with:




@Ryan_ This does seem like a good use case for an external monitor. Sadly I am not all that familiar with building them but the following two links might assist you in writing yours.