Forum Discussion
Healthcheck - JSON Response
Normally we use just normal http or https port checks to determine if the server is up or not. We are trying to change this and require developers to work on creating health checks into their sites.
The devs want to use JSON response and HTTP 200 response to determine up/down.
Here is what they would like to do.
Go to the following page:
https://subsite.company.com/CurrentVersion/HealthCheck
which redirects to below:
https://subsite.company.com/v1.0/HealthCheck
and returns this in JSON format
{"Uri":"https://subsite.company.com/CurrentVersion/HealthCheck","CurrentVersion":"v1.0"}
What is the best way to do this? The server is listening on port 443. Can I use a normal HTTPS monitor to do this or do I need to use a different method?
6 Replies
- Brad_Parker
Cirrus
If you want to follow the redirect for your health check you will have to create an external monitor that leverages curl -L which will follow the redirect.
- Grayson_149410
Nimbostratus
Do you have a good example of a curl external monitor? I'd like to try to figure out myself but need some direction as a lot of this is new to me.
- Brad_Parker_139
Nacreous
If you want to follow the redirect for your health check you will have to create an external monitor that leverages curl -L which will follow the redirect.
- Grayson_149410
Nimbostratus
Do you have a good example of a curl external monitor? I'd like to try to figure out myself but need some direction as a lot of this is new to me.
- Grayson_149410
Nimbostratus
Just bumping this up to see if anyone has any suggestions. I have verified that it actually doesn't do a redirect, all it does is place a JSON string on the webpage. It appears my monitors do not like { } brackets. - Grayson_149410
Nimbostratus
Bump
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