Created
December 21, 2016 18:18
-
-
Save ckolos/0def2a23423e8eb25d3760ad27a0f2c7 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
#!/usr/bin/env python2 | |
from datadog import initialize | |
from datadog import api | |
from sys import argv | |
import os, json | |
DD_API_KEY = os.getenv('DD_API_KEY') | |
DD_APP_KEY = os.getenv('DD_APP_KEY') | |
options = { | |
'api_key': DD_API_KEY, | |
'app_key': DD_APP_KEY | |
} | |
initialize(**options) | |
try: | |
(script, tb) = argv | |
except: | |
tb = raw_input("Enter a timeboard: ") | |
print json.dumps((api.Timeboard.get(tb)), sort_keys=True, indent=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may want to adjust the template vars. Or not. Your call.
<script> --title title --desc description --source source.json