Graphing with JSON
ネットワーク パフォーマンス モニタリングの正式提供を開始しました! ネットワーク パフォーマンス モニタリング提供開始!

Graphing with JSON

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

If you query a Datadog timeboard though the dashboard API, the result is a JSON object with the following layout:

DASHBOARD_SCHEMA = {
    "type": "object",
    "properties": {
        "title": {"type": "string"},
        "description": {"type": "string"},
        "layout_type": {"enum": ["ordered", "free"]},
        "is_read_only": {"type": "boolean"},
        "template_variables": {"type": "array", "items": TEMPLATE_VARIABLE_SCHEMA},
        "notify_list": {"type": "array", "items": {"type": "string"}},
        "widgets": {
            "type": "array",
            "items": WIDGET_SCHEMA
        }
    },
    "required": ["title", "layout_type", "widgets"],
}
ParameterTypeDescription
titlestringTitle of your dashboard.
descriptionstringDescription of the dashboard.
layout_typeenumLayout type of the dashboard. Available values are: ordered (previous timeboard) or free (previous screenboard layout)
is_read_onlyBooleanWhether this dashboard is read-only. If true, only the dashboard author and administrators can apply changes to it.
template_variablesarray of objectList of template variables for this dashboard. See the template variable schema documentation to learn more.
notify_listarray of stringsList of handles of users to notify when changes are made to this dashboard.
widgetsarray of objectList of widgets to display on the dashboard. See the dedicated Widget JSON schema documentation to build the WIDGET_SCHEMA.

Template variable schema

Dashboard template variables apply a new scope to one or more graphs on your dashboard. This allows you to dynamically explore metrics across different sets of tags by using variables instead of specific tags. To configure them through the Dashboard API, use the following layout:

TEMPLATE_VARIABLE_SCHEMA = {
    "type": "object",
    "properties": {
        "name": {"type": "string"},
        "default": {"type": "string"},
        "prefix": {"type": "string"},
    },
    "additionalProperties": false,
    "required": ["name"]
}
ParameterTypeDescription
namestringName of your template variable.
defaultstringDefault value for your template variable.
prefixstringTag group for your template variable.

Learn more about template variable in the Datadog UI.

Further Reading

お役に立つドキュメント、リンクや記事: