Skip to content

Commit

Permalink
Set time interval 1h and refresh 1m by default during dash import.
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-vynar committed Sep 8, 2016
1 parent eae9815 commit c16fae0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions import-dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ def main():
dash = json.load(f)
f.close()

# Set time options.
dash['time']['from'] = 'now-1h'
dash['time']['to'] = 'now'
dash['refresh'] = '1m'

data = json.dumps({'dashboard': dash, 'overwrite': True})
r = requests.post('%s/api/dashboards/db' % (HOST,), data=data, headers=headers)
if r.status_code != 200:
Expand Down

0 comments on commit c16fae0

Please sign in to comment.