04 Jul 2019 09:21 AM
04 Jul 2019 09:47 AM
All you need is available on this page:
Sebastian
04 Jul 2019 09:58 AM
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 ?
04 Jul 2019 10:07 AM
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 12:29 PM - last edited on 08 Apr 2021 09: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
04 Jul 2019 12:33 PM
My bad. I didn't found such usage in docs.
07 Aug 2023 07:11 AM
Awesome!
Thanks for sharing this. 😎
Alex Romanenkov