Integrating Alerts via the OpsCenter REST API
The DataStax OpsCenter Alerts feature allows users to be notified when specific metrics exceed configurable thresholds. This post demonstrates how to retrieve active alerts using Python via the OpsCenter REST API, assuming alert rules have been set up in OpsCenter and are working with a cluster called MyCluster. The code includes functions for getting URLs from the API, retrieving fired alerts and alert rules, connecting the dots between them, and formatting human-readable messages based on the type of alert rule. This can be used to integrate OpsCenter alerts into existing systems via their APIs.
Company
DataStax
Date published
Aug. 22, 2012
Author(s)
Mike Bulman
Word count
542
Hacker News points
None found.
Language
English