Datadog Dashboard: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
=External=
* https://docs.datadoghq.com/dashboards
* https://docs.datadoghq.com/dashboards
* https://docs.datadoghq.com/getting_started/dashboards/
=Internal=
* [[Datadog_Concepts#Dashboard|Datadog Concepts]]
=Overview=
=Overview=


Dashboard name:  
<font color=darkkhaki>TO DO:  
* https://docs.datadoghq.com/getting_started/dashboards/
* https://docs.datadoghq.com/tracing/guide/apm_dashboard/
* How a JSON representation of the dashboard can be produced via the API (not export from the console)?
</font>


=Export=
=Export=


Gear wheel → Export Dashboard JSON
Gear wheel → Export Dashboard JSON
=Concepts=
==Dashboard JSON Representation==
{{External|https://docs.datadoghq.com/dashboards/graphing_json/}}
<font size=-1>
{
  "[[#title|title]]":
  "description":
  "is_read_only": true,
  "[[#layout_type|layout_type]]": "ordered",
  "reflow_type": "fixed",
  "id": 444444444444444,
  "[[#widgets|widgets]]": [
    { ''[[#Widget_JSON_Representation|widget-JSON]]'' },
    ...
  ]
}
</font>
===Elements===
====<tt>title</tt>====
Required. It is not necessary that the title is unique, there could be two dashboards with the same title, though it is not recommended.
====<tt>layout_type</tt>====
Required. Possible values: "ordered".
====<tt>widgets</tt>====
Required.
====<tt>id</tt>====
<font color=darkkhaki>
Should I get rid of "id", isn't that unique and will be generated?
</font>
==Widget==
{{External|https://docs.datadoghq.com/dashboards/graphing_json/widget_json/}}
===Widget JSON Representation===
<font size=-1>
    {
      "id": 5555555555555555,
      "definition": {
        "[[#Widget_Title|title]]": "statsd.myapp.status_cache.load with cluster_name:my-eks-01",
        "title_size": "16",
        "title_align": "left",
        "show_legend": false,
        "type": "timeseries",
        "requests": [
          {
            "q": "statsd.myapp.status_cache.load{env:prod,cluster_name:my-eks-01}.as_count()",
            "display_type": "bars"
          }
        ]
      },
      "layout": {
        "x": 4,
        "y": 0,
        "width": 4,
        "height": 2
      }
    }
</font>
====Elements====
=====<span id='Widget_Title'></span><tt>title</tt>=====
Required. It is not necessary that the title is unique, there could be two widgets with the same title, though it is not recommended.
===Request JSON Representation===
{{External|https://docs.datadoghq.com/dashboards/graphing_json/request_json/}}
==Template Variable==
<font color=darkkhaki>
Understand template variables:
<syntaxhighlight lang='json'>
{
    "template_variables": [
        {
            "available_values": [],
            "default": "eks-01",
            "name": "cluster_name",
            "prefix": "cluster_name"
        }
    ],
    ...
}
</syntaxhighlight>
</font>

Latest revision as of 21:55, 16 April 2022

External

Internal

Overview

TO DO:

Export

Gear wheel → Export Dashboard JSON

Concepts

Dashboard JSON Representation

https://docs.datadoghq.com/dashboards/graphing_json/

{
  "title":
  "description":
  "is_read_only": true,
  "layout_type": "ordered",
  "reflow_type": "fixed",
  "id": 444444444444444,
  "widgets": [
    { widget-JSON },
    ...
  ]
}

Elements

title

Required. It is not necessary that the title is unique, there could be two dashboards with the same title, though it is not recommended.

layout_type

Required. Possible values: "ordered".

widgets

Required.

id

Should I get rid of "id", isn't that unique and will be generated?

Widget

https://docs.datadoghq.com/dashboards/graphing_json/widget_json/

Widget JSON Representation

   {
     "id": 5555555555555555,
     "definition": {
       "title": "statsd.myapp.status_cache.load with cluster_name:my-eks-01",
       "title_size": "16",
       "title_align": "left",
       "show_legend": false,
       "type": "timeseries",
       "requests": [
         {
           "q": "statsd.myapp.status_cache.load{env:prod,cluster_name:my-eks-01}.as_count()",
           "display_type": "bars"
         }
       ]
     },
     "layout": {
       "x": 4,
       "y": 0,
       "width": 4,
       "height": 2
     }
   }

Elements

title

Required. It is not necessary that the title is unique, there could be two widgets with the same title, though it is not recommended.

Request JSON Representation

https://docs.datadoghq.com/dashboards/graphing_json/request_json/

Template Variable

Understand template variables:

{
    "template_variables": [
        {
            "available_values": [],
            "default": "eks-01",
            "name": "cluster_name",
            "prefix": "cluster_name"
        }
    ],
    ...
}