arthurai.core.alerts.AlertRule#
- class arthurai.core.alerts.AlertRule(bound, threshold, metric_id, severity, name=None, lookback_period=None, subsequent_alert_wait_time=None, enabled=True, id=None, metric_name=None, metric_parameters=None, filters=None)#
Bases:
arthurai.core.base.ArthurBaseJsonDataclass
Methods
Helper function to filter out None objects from a json or dictionary representation of an object
from_dict
- rtype
TypeVar
(A
, bound=DataClassJsonMixin
)
from_json
- rtype
TypeVar
(A
, bound=DataClassJsonMixin
)
schema
- rtype
SchemaF
[TypeVar
(A
)]
Creates a dictionary representation of this object
Creates a json representation of this object
Attributes
dataclass_json_config
enabled
filters
id
lookback_period
metric_name
metric_parameters
name
subsequent_alert_wait_time
bound
threshold
metric_id
severity
- static clean_nones(d)#
Helper function to filter out None objects from a json or dictionary representation of an object
- Parameters
d – a Dictionary or Json representation of an ArthurBaseJsonDataclass object
- Returns
Dictionary of the object with all None components removed
- to_dict(skip_none=True)#
Creates a dictionary representation of this object
This function can be applied to any extension of the ArthurBaseJsonDataClass
- Return type
dict
- Returns
Dictionary of object data
- to_json(skip_none=True)#
Creates a json representation of this object
This function can be applied to any extension of the ArthurBaseJsonDataClass
- Return type
str
- Returns
json of object data