Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Bulman mbulman

  • DataStax
  • Austin, TX
View GitHub Profile
@mbulman
mbulman / fetch-opscenter-alerts.py
Created Aug 22, 2012
Integrating Alerts via the OpsCenter REST API
View fetch-opscenter-alerts.py
import urllib, json, time
def getUrl(path):
""" Makes an OpsCenter API call to the given path """
url = 'http://localhost:8888/%s' % path
contents = urllib.urlopen(url).read()
return json.loads(contents)
def pollCluster(cluster_id):