Creates a new alert filter.
Renamed API
The Alert Filter Plans API was previously called V1 Maintenance Plans or V1 Plans. The functionality of the API has not changed, but the name has been updated to clarify which BigPanda feature the API manages.
Authentication
All BigPanda APIs require Bearer Token Authorization in the call headers.
This API uses the Org Token type of Authorization token.
Plan Limit
Each organization can have up to 3,500 V1 alert filters.
Condition Limitations
Alert filter conditions cannot be longer than 25,000 characters long.
All alert tags in alert filter conditions are case-insensitive.
Schedule ID
The schedule ID is needed to add a schedule to a filter.
OK Status
By default, alert filters ignore events that have an
ok
status. These events will still enter the system and resolve any related open alerts.This setting can be changed by explicitly including the
exclude_status
field as an empty array.
Sample Calls
curl --request POST \
--url https://api.bigpanda.io/resources/v1.0/plans \
--header 'Authorization: Bearer <Org Token>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"active": true,
"exclude_status": [
"Ok",
"Critical"
],
"name": "weekend maintenance",
"bpql": {
"=": [
"host",
{
"type": "regex",
"value": "prod-api-*"
}
]
},
"custom_tags": [
{
"name": "check",
"value": "CPU*"
}
],
"schedule": "12346161",
"description": "Suppression during server refresh"
}
'
curl --request POST \
--url https://eu-api.bigpanda.io/resources/v1.0/plans \
--header 'Authorization: Bearer <Org Token>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"active": true,
"exclude_status": [
"Ok",
"Critical"
],
"name": "weekend maintenance",
"bpql": {
"=": [
"host",
{
"type": "regex",
"value": "prod-api-*"
}
]
},
"custom_tags": [
{
"name": "check",
"value": "CPU*"
}
],
"schedule": "12346161",
"description": "Suppression during server refresh"
}
'
BPQL Object Formatting
The condition
body parameter uses special BPQL object formatting. See BPQL Object Syntax for more information.
Example BPQL Objects:
Command | BPQL String | BPQL Object |
---|---|---|
Wildcard * | host = prod-api-* | { "=": [ "host", { "type": "regex", "value": "prod-api-*" }]} |
Formal Regex Search | host = /prod-api-.*/ | { "=": [ "host", { "type": "formal-regex", "value": "prod-api-.*" }]} |