Last active
June 16, 2016 17:10
-
-
Save estib/ef961dda896d9d1ab20aa2bcdc24232f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datadog import initialize, api | |
options = { | |
'api_key': 'api_key', | |
'app_key': 'app_key', | |
'thresholds': {'critical': 100, 'warning': 80} | |
} | |
initialize(**options) | |
resp = api.Monitor.create( | |
type="metric alert", | |
query="avg(last_1h):sum:system.net.bytes_rcvd{*} > 100", | |
name="Bytes received on host1", | |
message="We may need to add web hosts if this is consistently high.", | |
tags=['test'], | |
options=options | |
) | |
print resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment