skyline.mirage package¶
Submodules¶
skyline.mirage.agent module¶
skyline.mirage.mirage module¶
skyline.mirage.mirage_alerters module¶
-
skyline_version
= 'Skyline (ionosphere v1.1.11-stable)'¶ Create any alerter you want here. The function will be invoked from trigger_alert. Four arguments will be passed, two of them tuples: alert and metric.
alert: the tuple specified in your settings:
alert[0]: The matched substring of the anomalous metric
alert[1]: the name of the strategy being used to alert
alert[2]: The timeout of the alert that was triggered
alert[3]: The SECOND_ORDER_RESOLUTION_HOURS
metric: information about the anomaly itself
metric[0]: the anomalous value
metric[1]: The full name of the anomalous metric
metric[2]: anomaly timestamp
second_order_resolution_seconds: int
context: the app name
-
alert_smtp
(alert, metric, second_order_resolution_seconds, context)[source]¶ Called by
trigger_alert()
and sends an alert via smtp to the recipients that are configured for the metric.
-
alert_pagerduty
(alert, metric, second_order_resolution_seconds, context)[source]¶ Called by
trigger_alert()
and sends an alert via PagerDuty
-
alert_hipchat
(alert, metric, second_order_resolution_seconds, context)[source]¶ Called by
trigger_alert()
and sends an alert the hipchat room that is configured in settings.py.
-
trigger_alert
(alert, metric, second_order_resolution_seconds, context)[source]¶ Called by
run
to trigger an alert, Mirage passes two arguments, both of them tuples. The alerting strategy is determined and the approriate alert def is then called and passed the tuples.Parameters: - alert –
The alert tuple specified in settings.py.
alert[0]: The matched substring of the anomalous metric
alert[1]: the name of the strategy being used to alert
alert[2]: The timeout of the alert that was triggered
alert[3]: The SECOND_ORDER_RESOLUTION_HOURS
- meric –
The metric tuple.
metric[0]: the anomalous value
metric[1]: The full name of the anomalous metric
metric[2]: anomaly timestamp
- context (str) – app name
- alert –