Skip to content

Instantly share code, notes, and snippets.

@horttanainen
Created February 27, 2019 15:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save horttanainen/2abd23a0c9ced13c6c660e5329928dcd to your computer and use it in GitHub Desktop.
Save horttanainen/2abd23a0c9ced13c6c660e5329928dcd to your computer and use it in GitHub Desktop.
Create a datadog screenboard from a timeboard
#!/usr/bin/env bash
#params
#dd_api_key=
#dd_app_key=
#dash_id=
curl -sX GET "https://app.datadoghq.com/api/v1/dash/${dash_id}?api_key=${dd_api_key}&application_key=${dd_app_key}" \
| jq '{
board_title: .dash.title,
description: .dash.description,
template_variables: .dash.template_variables,
widgets: [.dash.graphs[] | { type: .definition.viz, tile_def: .definition, title: true, title_text: .title, autoscale: true, x: 0, y: 0 }]
}' \
| curl -H "Content-type: application/json" -d @- \
"https://app.datadoghq.com/api/v1/screen?api_key=${dd_api_key}&application_key=${dd_app_key}"
@horttanainen
Copy link
Author

Thank you @jtafurth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment