All you need is available on this page:
Sebastian
Thx for this quick answer. Does it mean that there is no way to declare an alert from the plugin.json file when using statetimeseries ?
No, you have to use dynatrace API to set threshold for custom metric. After this events will fire automatically, but this is not configurable from plugin.json (according to my knowledge).
Sebastian
04 Jul 2019
04:29 AM
- last edited on
08 Apr 2021
01:12 PM
by
Karolina_Linda
Fortunately it's possible to define an alert on statetimeseries, here is an example:
"metrics": [
{
"statetimeseries": {
"key": "node_state",
"states": ["Synchronized", "Sync in progress", "Unsynchronized"],
"dimensions": [],
"displayname": "Node status"
},
"alert_settings": [
{
"alert_id": "sync_in_progress",
"event_type": "AVAILABILITY_EVENT",
"event_name": "Redis Node synchronization in progress",
"default_state": "inactive",
"threshold": 0,
"description": "Node is {severity} for {violating_samples}.",
"alert_condition": "ABOVE",
"samples": 5,
"violating_samples": 3,
"dealerting_samples": 5,
"state_name": "Sync in progress"
},
{
"alert_id": "unsynchronized",
"event_type": "AVAILABILITY_EVENT",
"event_name": "Redis Node unsynchronized",
"threshold": 0,
"description": "Node is {severity} for {violating_samples}.",
"alert_condition": "ABOVE",
"samples": 5,
"violating_samples": 3,
"dealerting_samples": 5,
"state_name": "Unsynchronized"
}
]
}
]
Peter
My bad. I didn't found such usage in docs.
Thanks a lot !