Incidents and Alerts API
This API provides two endpoints:
/incident
: Operations that retrieve incident information or clear an incident/alertmuting
: Operations that create, retrieve, update, or delete notification muting rules
An incident is the combination of an alert event and a clear event. SignalFx
generates alert events when an incoming stream of data triggers a rule you've defined for a
detector. When the condition that triggered the alert is no longer true, SignalFx
triggers a clear event. Use the /incident
endpoint to retrieve information for these
events.
Notification muting controls the optional notifications for a detector rule. If you've defined a notification service for a detector rule, SignalFx sends you a notification for an alert event and a clear event. Notification muting controls these notifications.
To learn more about notification muting, see the section Mute notifications in the product documentation.
/incident
and /alertmuting
endpoints work with all alerts, events, incidents, and notifications,
regardless of which detector version created them. This means that you can use the
endpoints to work with incidents and muting rules for detectors you create in the web UI.
Retrieves muting rules based on search criteria
Retrieves muting rules based on the query
you specify in the query
query parameter.
This endpoint retrieves muting rules regardless of the version
of the detector associated with the rule.
query Parameters
include | string Specifies the type of muting rules you want to retrieve. The allowed values are:
|
limit | integer <int32> The number of results to return from the result set. |
offset | integer <int32> The result object in the result set at which the API should start returning results to you. If omitted, the API starts at the first result in the set. |
orderBy | string The metadata property on which the API should sort the results. You don't have to include this property in the query, but the name must be a property of muting rules. |
query | string Query that specifies the muting rules you want to retrieve. |
header Parameters
X-SF-TOKEN required | string Authentication token. |
Responses
Content-Type | string Default: "application/json" Format of the response body. Always |
Response Schema: application/json
count | integer <int64> (Count of matched muting rules) Number of muting rules that match the search criteria. This property is read-only. NOTE: Count is not the same as the number of objects returned in the response body:
|
Array of objects (AlertMutingRule) Query results, in the form of a JSON array of objects. Each element is a muting rule. |
Response samples
- 200
{- "count": 0,
- "results": [
- {
- "created": 1556825430000,
- "creator": "AAXYAAAAAZ3",
- "description": "string",
- "filters": [
- [
- {
- "NOT": false,
- "property": "aws_availability_zone",
- "propertyValue": "us-east-1a"
}, - {
- "NOT": true,
- "property": "cpu.utilization",
- "propertyValue": 10.7
}, - {
- "NOT": false,
- "property": "aws_availability_zone",
- "propertyValue": [
- "us-east-2a",
- "us-west-1a",
- "emea-west-2a"
]
}
]
], - "id": "string",
- "lastUpdated": 1557689430000,
- "lastUpdatedBy": "string",
- "sendAlertsOnceMutingPeriodHasEnded": true,
- "startTime": 0,
- "stopTime": 0
}
]
}
Creates a new muting rule
Creates a new muting rule, based on the specifications in the request body. Unlike the detector APIs, you can use the muting APIs with detectors you create in the web UI as well as detectors you create with the API.
NOTE: In some cases, SignalFx may send notifications during a muting period. To learn more, see the section Mute notifications in the product documentation.
When you create a muting rule, you can resolve all of the alerts for the
muting rule you created by setting the optional resolveMatchingActiveAlerts
query parameter to true
. The flag's default value is false
.
query Parameters
resolveMatchingActiveAlerts | boolean Example: resolveMatchingActiveAlerts=true Optional resolve alerts flag. If you set the flag to |
header Parameters
Content-Type required | string Format of the request body. Always |
X-SF-TOKEN required | string Authentication token. |
Request Body schema: application/json
Contains the specification of a new muting rule.
NOTE: You can't create properties that are marked read-only
description | string Description of the rule. read/write |
Array of objects (AlertMutingFilter) List of muting filters for this rule, in the form of a JSON array. Each array element specifies a single filter. A muting filter JSON specifies the following:
A filter mutes an alert based on the following:
If
| |
sendAlertsOnceMutingPeriodHasEnded | boolean (SendAlertsOnceMutingPeriodHasEnded) Default: true Controls notifications after the muting period ends. To learn more, see the section Mute notifications in the product documentation. |
startTime | integer <int64> (StartTime) >= 0 Starting time of a muting rule, in Unix time. If not specified, defaults to the current time. read/write. |
stopTime | integer <int64> (StopTime) >= 0 Default: 0 Stop time of a muting rule, in Unix time. If set to 0, detectors that match this rule are muted indefinitely. The default value is 0. read/write |
Responses
Content-Type | string Default: "application/json" Format of the response body. Always |
Response Schema: application/json
created | integer <int64> (Creation time) The time the muting rule was created, in Unix time. This property is read-only; it's always set by the system. |
creator | string (Creator user ID) SignalFx user ID of the muting rule creator. This property is read-only; it's always set by the system. |
description | string Description of the rule. read/write |
Array of objects (AlertMutingFilter) List of muting filters for this rule, in the form of a JSON array. Each array element specifies a single filter. A muting filter JSON specifies the following:
A filter mutes an alert based on the following:
If
| |
id | string (Muting rule ID) SignalFx-assigned ID of a muting rule. This property is read-only; it's always set by the system. |
lastUpdated | integer <int64> (Muting rule last updated time) The last time the muting rule was last updated, in Unix time. This property is read-only; it's always set by the system. |
lastUpdatedBy | string (SignalFx ID of user who last updated the muting rule) The SignalFx-assigned user ID of the last user who updated the muting rule. If the system made the last update, the value is "AAAAAAAAAA". This property is read-only; it's always set by the system. |
sendAlertsOnceMutingPeriodHasEnded | boolean (SendAlertsOnceMutingPeriodHasEnded) Default: true Controls notifications after the muting period ends. To learn more, see the section Mute notifications in the product documentation. |
startTime | integer <int64> (StartTime) >= 0 Starting time of a muting rule, in Unix time. If not specified, defaults to the current time. read/write. |
stopTime | integer <int64> (StopTime) >= 0 Default: 0 Stop time of a muting rule, in Unix time. If set to 0, detectors that match this rule are muted indefinitely. The default value is 0. read/write |
Request samples
- Payload
{- "description": "string",
- "filters": [
- [
- {
- "NOT": false,
- "property": "aws_availability_zone",
- "propertyValue": "us-east-1a"
}, - {
- "NOT": true,
- "property": "cpu.utilization",
- "propertyValue": 10.7
}, - {
- "NOT": false,
- "property": "aws_availability_zone",
- "propertyValue": [
- "us-east-2a",
- "us-west-1a",
- "emea-west-2a"
]
}
]
], - "sendAlertsOnceMutingPeriodHasEnded": true,
- "startTime": 0,
- "stopTime": 0
}
Response samples
- 201
{- "created": 1556825430000,
- "creator": "AAXYAAAAAZ3",
- "description": "string",
- "filters": [
- [
- {
- "NOT": false,
- "property": "aws_availability_zone",
- "propertyValue": "us-east-1a"
}, - {
- "NOT": true,
- "property": "cpu.utilization",
- "propertyValue": 10.7
}, - {
- "NOT": false,
- "property": "aws_availability_zone",
- "propertyValue": [
- "us-east-2a",
- "us-west-1a",
- "emea-west-2a"
]
}
]
], - "id": "string",
- "lastUpdated": 1557689430000,
- "lastUpdatedBy": "string",
- "sendAlertsOnceMutingPeriodHasEnded": true,
- "startTime": 0,
- "stopTime": 0
}
Deletes a muting rule specified in the {id} path parameter
Deletes a muting rule, specified by the rule ID in the {id}
path parameter. Unlike the detector APIs that create v2 detectors,
you can use the muting APIs with detectors you create using the web
UI as well as detectors you create using the API (v2 detectors).
This operation doesn't return a response body.
NOTE: You can't delete an active muting rule.
path Parameters
id required | string The SignalFx-assigned ID of a muting rule |
header Parameters
X-SF-TOKEN required | string Authentication token. |
Responses
Retrieves the muting rule specified in the {id} path parameter
Retrieves a muting rule, based on the rule ID specified in the
{id}
path parameter. Unlike the detector APIs, you can use the alert
muting APIs with detectors you create in the web UI as well as detectors you
create with the API.
path Parameters
id required | string SignalFx-assigned ID of a muting rule |
header Parameters
X-SF-TOKEN required | string Authentication token. |
Responses
Content-Type | string Default: "application/json" Format of the response body. Always |
Response Schema: application/json
created | integer <int64> (Creation time) The time the muting rule was created, in Unix time. This property is read-only; it's always set by the system. |
creator | string (Creator user ID) SignalFx user ID of the muting rule creator. This property is read-only; it's always set by the system. |
description | string Description of the rule. read/write |
Array of objects (AlertMutingFilter) |