Operations Basics / Version 2304
Table Of ContentsThe runlevel endpoint provides the possibility to switch the runlevel on a content server.
Endpoint properties.
management.endpoint.runlevel.enabled=true
Endpoint URL.
http://localhost:8081/actuator/runlevel
When requested using a GET HTTP request, the endpoint will respond which runlevel is currently active.
Response.
{ "RUNLEVEL": "ONLINE" }
To switch the runlevel, send a POST request to the endpoint with the desired runlevel and a grace period for the switch.
Switch runlevel.
curl -X POST -H "Content-Type: application/json" \ -d '{"runlevel": "MAINTENANCE", "gracePeriod": 30}' \ http://localhost:8081/actuator/runlevel