WebApp
Web Apps

Set the web app health check settings

Changed on

This function changes the settings the scheduled web application health check runs with. Only the parameters you pass change.

Provide at least one parameter.

A value outside its permitted range is refused rather than adjusted, so the response never reports a figure you did not ask for.

get/WebApp/set_health_settings

Request

  • Base URL
    https://whm-server.tld:2087/json-api
  • Auth
    HTTP basic

Query parameters

auto_recovery0 | 1

Whether the scheduled health check may take action on an application at all.

  • 1 — Let it.
  • 0 — Stop it taking action on any application on the server.
cooldowninteger
Example:900

How long after the health check acts on an application before it may act on it again, in seconds.

daily_capinteger
Example:10

The most times the health check may act on one application in a day.

notify_admin0 | 1
Example:1

Whether the server-wide alert emails anyone at all.

  • 1 — Email it when too many of the server's web applications are unhealthy at once.
  • 0 — Stay silent about it. This is the default; the pause on acting is not affected either way.
notify_targetstring
Example:oncall@example.com

The account name or email address to send the server-wide alert to when notify_admin is on. Pass an empty value to send it to root, which is the default.

sweep_intervalinteger
Example:600

The shortest gap between two health check passes, in seconds.

The floor is 300, which is the gap the installed schedule delivers.

Response

HTTP Request was successful.

Example response

{
  "data": {
    "auto_recovery": 1,
    "cooldown": 600,
    "daily_cap": 10,
    "sweep_interval": 300
  },
  "metadata": {
    "command": "set_health_settings",
    "namespace": "WebApp",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}

Changes