-
Notifications
You must be signed in to change notification settings - Fork 5
Alerts API
Anton Zelenin edited this page Jun 11, 2021
·
24 revisions
Daria agent provides API endpoints that allow you to get triggered alerts of your Anodot account.
Endpoint:
/alert/status
| Parameter | Type | Required | Description |
|---|---|---|---|
alertName |
String | Yes | Name of an alert group |
host |
String | No | Value of the host dimension of alert metrics |
startTime |
Integer | No | Retrieve alerts which started after this time (epoch time), default one week |
Request example:
curl -X GET http://locahost:8080/alert/status?alertName=drop_in_bps&host=us_host18
Response:
{
"status": "OPEN"
}
If no alert was found by specified parameters the response will be { "status": "No alert" }
Endpoint
/alerts
| Parameter | Type | Required | Description |
|---|---|---|---|
status |
String | Yes | Get alerts wit status: OPEN, CLOSE
|
sort |
String | No | Sort alerts by field, possible values: startTime, updateTime, score, metrics. Default - updateTime
|
order |
String | No | Alerts sort order: asc, desc. Default - desc
|
startTime |
Integer | No | Retrieve alerts which started after this time (epoch time), default one week. Notice: this filter will be applied only for CLOSE status. In case of OPEN status all open alerts will be returned. |
Request example:
curl -X GET http://locahost:8080/alerts?status=OPEN
Response:
{
"alertGroups": [
{
"alerts": [
{
"startTime": 1623223687,
"updateTime": 1623223687,
"endTime": 1623223687,
"status": "OPEN",
"type": "anomaly",
"metrics": [
{
"host": "us_host18",
"what": "traffic_in",
"score": 0.8723423
}
]
}
],
"id": "33b5676573-80as-4k73-99ca-asdf8897afdafya",
"name": "Drop in traffic in"
}
],
"total": 1
}
In case a request contained an error in a field, or had a missing field, the response will contain "status": "Abnormal request" and a list of errors with their description.
Error response example:
{
"status": "Abnormal request",
"errors": {
"alertName": ["This field is required."],
"startTime": ["Not a valid integer value"]
}
}
In case the agent wasn't able to send a request to Anodot, the response will contain "status": "Not connected" and a list of errors describing the connection issue.
Error response example:
{
"status": "Not connected",
"errors": {
"Unauthorized": ["401 Client Error: Unauthorized for url: https://api.anodot.com/api/v2/alerts/triggered"]
}
}
- Home
- CLI reference
- API
- Kubernetes setup using Helm
- Podman setup
- Creating pipelines
- Test sources
- Data formats (JSON, CSV, AVRO, LOG)
- How to parse logs with grok patterns
- How to store sensitive information
- Automated pipelines creation
- Filtering
- Transformation files
- Fields
- DVP Configuration
- Integrations
- Sending events to Anodot