skyline.analyzer package¶
Submodules¶
skyline.analyzer.agent module¶
skyline.analyzer.alerters module¶
-
skyline_version
= 'Skyline (ionosphere v1.1.11-stable)'¶ Create any alerter you want here. The function will be invoked from trigger_alert.
Three 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
metric: information about the anomaly itself
metric[0]: the anomalous value
metric[1]: The full name of the anomalous metric
metric[2]: anomaly timestamp
context: app name
-
alert_smtp
(alert, metric, 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, context)[source]¶ Called by
trigger_alert()
and sends an alert via PagerDuty
-
alert_hipchat
(alert, metric, context)[source]¶ Called by
trigger_alert()
and sends an alert the hipchat room that is configured in settings.py.
-
alert_syslog
(alert, metric, context)[source]¶ Called by
trigger_alert()
and log anomalies to syslog.
-
trigger_alert
(alert, metric, context)[source]¶ Called by
skyline.analyzer.Analyzer.spawn_alerter_process
to trigger an alert.Analyzer passes three arguments, two 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
- 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 –