Skip to content

Instantly share code, notes, and snippets.

View mbulman's full-sized avatar

Mike Bulman mbulman

View GitHub Profile
@mbulman
mbulman / fetch-opscenter-alerts.py
Created August 22, 2012 16:13
Integrating Alerts via the OpsCenter REST API
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):