/config/lua/script/alertd

The Lua script loaded by alert reporting daemon. This script can be used to define helper functions that can then be called from the alert conditions.

If loading this script takes longer than 15 seconds or evaluating any custom alert condition takes longer than 60 seconds, an alert is raised.

Get /config/lua/script/alertd

SecurityApiKey
Responses
200

Normal response.

401

Unauthorized response.

get/config/lua/script/alertd
Request samples
Response samples
application/json
{
  • "result": "print(\"this is the alert script\");",
  • "error": "Error message (present if an error occurred)."
}

Replace /config/lua/script/alertd

SecurityApiKey
Request
Request Body schema: application/json
string (configLuaScriptAlertd)

The Lua script loaded by alert reporting daemon. This script can be used to define helper functions that can then be called from the alert conditions.

If loading this script takes longer than 15 seconds or evaluating any custom alert condition takes longer than 60 seconds, an alert is raised.

Responses
200

Normal response.

401

Unauthorized response.

put/config/lua/script/alertd
Request samples
application/json
"print(\"this is the alert script\");"
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Update /config/lua/script/alertd

SecurityApiKey
Request
Request Body schema: application/json
string (configLuaScriptAlertd)

The Lua script loaded by alert reporting daemon. This script can be used to define helper functions that can then be called from the alert conditions.

If loading this script takes longer than 15 seconds or evaluating any custom alert condition takes longer than 60 seconds, an alert is raised.

Responses
200

Normal response.

401

Unauthorized response.

post/config/lua/script/alertd
Request samples
application/json
"print(\"this is the alert script\");"
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}

Delete /config/lua/script/alertd

Reset to empty string.

SecurityApiKey
Responses
200

Normal response.

401

Unauthorized response.

delete/config/lua/script/alertd
Request samples
Response samples
application/json
{
  • "status": "OK",
  • "error": "Error message (present if an error occurred)."
}