mirror of
https://github.com/valitydev/grafanalib.git
synced 2024-11-06 02:05:19 +00:00
Add "for" param for alerts, Grafana 6.X
This parametr sets a grace period during which no notifications are set.
This commit is contained in:
parent
f9c5a2944c
commit
42941c5b06
@ -2,6 +2,14 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.5.3 (2019-05-05)
|
||||
==================
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
* Add ``for`` parameter for alerts on Grafana 6.X
|
||||
|
||||
0.5.2 (2018-07-19)
|
||||
==================
|
||||
|
||||
|
@ -835,6 +835,7 @@ class Alert(object):
|
||||
handler = attr.ib(default=1)
|
||||
noDataState = attr.ib(default=STATE_NO_DATA)
|
||||
notifications = attr.ib(default=attr.Factory(list))
|
||||
gracePeriod = attr.ib(default='5m')
|
||||
|
||||
def to_json_data(self):
|
||||
return {
|
||||
@ -846,6 +847,7 @@ class Alert(object):
|
||||
"name": self.name,
|
||||
"noDataState": self.noDataState,
|
||||
"notifications": self.notifications,
|
||||
"for": self.gracePeriod,
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user