Skip to content

Instantly share code, notes, and snippets.

@pmbauer
Last active November 5, 2020 12:14
Show Gist options
  • Save pmbauer/4de4871a38246ee9ee77 to your computer and use it in GitHub Desktop.
Save pmbauer/4de4871a38246ee9ee77 to your computer and use it in GitHub Desktop.

Revisions

  1. pmbauer revised this gist Mar 2, 2016. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions screen-time.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    #dd_api_key=
    #dd_app_key=
    #screen_id=
    #!/usr/bin/env bash
    #params
    # dd_api_key=
    # dd_app_key=
    # screen_id=
    curl -sX GET "https://app.datadoghq.com/api/v1/screen/${screen_id}?api_key=${dd_api_key}&application_key=${dd_app_key}" \
    | jq '{
    title: .board_title,
  2. pmbauer revised this gist Mar 2, 2016. No changes.
  3. pmbauer created this gist Mar 2, 2016.
    12 changes: 12 additions & 0 deletions screen-time.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #dd_api_key=
    #dd_app_key=
    #screen_id=
    curl -sX GET "https://app.datadoghq.com/api/v1/screen/${screen_id}?api_key=${dd_api_key}&application_key=${dd_app_key}" \
    | jq '{
    title: .board_title,
    description: .board_title,
    template_variables: .template_variables,
    graphs: [.widgets[] | {title: .title_text, definition: .tile_def}]
    }' \
    | curl -sX POST -H "Content-type: application/json" -d @- \
    "https://app.datadoghq.com/api/v1/dash?api_key=${dd_api_key}&application_key=${dd_app_key}"