Alerts
Alerts configuration allows Inigo's users to configure custom alerts that will be triggered as Inigo events when configured conditions are met.
Example of an alert which is triggered when:
- service receives at least
5
requests - within
2 minutes
time window - with operation name
Login
- with
errors
Sample Config
alerts.yaml
kind: Alerts
name: demo
label: starwars
spec:
alerts:
- name: "login_errors"
metric: calls
window: 2m
threshold : 5
filters:
operation_name: Login
has_errors: true
Spec
This section defines the format of Inigo's Alerts
type configuration files. Fields marked as required
must be specified if the parent is defined.
Field | Type | Description |
---|---|---|
alerts | [AlertsConfig] | List of alerts configurations |
AlertsConfig
Field | Type | Description |
---|---|---|
name | string required | Name of the Alert |
window | string required | Time window in which given amount of requests should occur String represents the duration in the form "72h3m0.5s". |
threshold | int | Sets how many requests will trigger an alert |
filters | AlertsFilter | |
immediate | boolean | Triggers an immediate alert as soon as the specified threshold within a time window is reached. A subsequent alert is then dispatched at the conclusion of the window, provided the threshold is still met. |
AlertsFilter
Field | Type | Description |
---|---|---|
hash | string | Hash of the request query |
status | string default:NONE | Request status One of: - PASSED - BLOCKED - EXCEPTION - NONE |
operation_type | string default:UNKNOWN | Request operation type One of: - QUERY - MUTATION - SUBSCRIPTION - UNKNOWN |
operation_name | string | Request operation name |
client | string | Request client version |
has_errors | boolean | Whether request has errors or not |
error | string | Request error message |
error_contains | string | Request error contains message |
tag | string | Request with a tag |