Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

ScreenBoard

Provides a Datadog screenboard resource. This can be used to create and manage Datadog screenboards.

Note: This resource is outdated. Use the new datadog.Dashboard resource instead.

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new Datadog screenboard
        var acceptanceTest = new Datadog.ScreenBoard("acceptanceTest", new Datadog.ScreenBoardArgs
        {
            Title = "Test Screenboard",
            ReadOnly = true,
            TemplateVariables = 
            {
                new Datadog.Inputs.ScreenBoardTemplateVariableArgs
                {
                    Name = "varname 1",
                    Prefix = "pod_name",
                    Default = "*",
                },
                new Datadog.Inputs.ScreenBoardTemplateVariableArgs
                {
                    Name = "varname 2",
                    Prefix = "service_name",
                    Default = "autoscaling",
                },
            },
            Widgets = 
            {
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "free_text",
                    X = 5,
                    Y = 5,
                    Text = "test text",
                    TextAlign = "right",
                    FontSize = "36",
                    Color = "#ffc0cb",
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "timeseries",
                    X = 25,
                    Y = 5,
                    Title = "graph title terraform",
                    TitleSize = 16,
                    TitleAlign = "right",
                    Legend = true,
                    LegendSize = "16",
                    Time = 
                    {
                        { "live_span", "1d" },
                    },
                    TileDeves = 
                    {
                        new Datadog.Inputs.ScreenBoardWidgetTileDefArgs
                        {
                            Viz = "timeseries",
                            Requests = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    Q = "avg:system.cpu.user{*}",
                                    Type = "line",
                                    Style = 
                                    {
                                        { "palette", "purple" },
                                        { "type", "dashed" },
                                        { "width", "thin" },
                                    },
                                    MetadataJson = JsonSerializer.Serialize(new Dictionary<string, object?>
                                    {
                                        { "avg:system.cpu.user{*}", new Dictionary<string, object?>
                                        {
                                            { "alias", "CPU Usage" },
                                        } },
                                    }),
                                },
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    LogQuery = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestLogQueryArgs
                                    {
                                        Index = "mcnulty",
                                        Compute = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestLogQueryComputeArgs
                                        {
                                            Aggregation = "avg",
                                            Facet = "@duration",
                                            Interval = "5000",
                                        },
                                        Search = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestLogQuerySearchArgs
                                        {
                                            Query = "status:info",
                                        },
                                        GroupBies = 
                                        {
                                            new Datadog.Inputs.ScreenBoardWidgetTileDefRequestLogQueryGroupByArgs
                                            {
                                                Facet = "host",
                                                Limit = 10,
                                                Sort = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestLogQueryGroupBySortArgs
                                                {
                                                    Aggregation = "avg",
                                                    Order = "desc",
                                                    Facet = "@duration",
                                                },
                                            },
                                        },
                                    },
                                    Type = "area",
                                },
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    ApmQuery = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestApmQueryArgs
                                    {
                                        Index = "apm-search",
                                        Compute = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestApmQueryComputeArgs
                                        {
                                            Aggregation = "avg",
                                            Facet = "@duration",
                                            Interval = "5000",
                                        },
                                        Search = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestApmQuerySearchArgs
                                        {
                                            Query = "type:web",
                                        },
                                        GroupBies = 
                                        {
                                            new Datadog.Inputs.ScreenBoardWidgetTileDefRequestApmQueryGroupByArgs
                                            {
                                                Facet = "resource_name",
                                                Limit = 50,
                                                Sort = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestApmQueryGroupBySortArgs
                                                {
                                                    Aggregation = "avg",
                                                    Order = "desc",
                                                    Facet = "@string_query.interval",
                                                },
                                            },
                                        },
                                    },
                                    Type = "bars",
                                },
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    ProcessQuery = new Datadog.Inputs.ScreenBoardWidgetTileDefRequestProcessQueryArgs
                                    {
                                        Metric = "process.stat.cpu.total_pct",
                                        SearchBy = "error",
                                        FilterBies = 
                                        {
                                            "active",
                                        },
                                        Limit = 50,
                                    },
                                    Type = "area",
                                },
                            },
                            Markers = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefMarkerArgs
                                {
                                    Label = "test marker",
                                    Type = "error dashed",
                                    Value = "y < 6",
                                },
                            },
                            Events = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefEventArgs
                                {
                                    Q = "test event",
                                },
                            },
                        },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "query_value",
                    X = 45,
                    Y = 25,
                    Title = "query value title terraform",
                    TitleSize = 20,
                    TitleAlign = "center",
                    Legend = true,
                    LegendSize = "16",
                    TileDeves = 
                    {
                        new Datadog.Inputs.ScreenBoardWidgetTileDefArgs
                        {
                            Viz = "query_value",
                            Requests = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    Q = "avg:system.cpu.user{*}",
                                    Type = "line",
                                    Style = 
                                    {
                                        { "palette", "purple" },
                                        { "type", "dashed" },
                                        { "width", "thin" },
                                    },
                                    ConditionalFormats = 
                                    {
                                        new Datadog.Inputs.ScreenBoardWidgetTileDefRequestConditionalFormatArgs
                                        {
                                            Comparator = ">",
                                            Value = "1",
                                            Palette = "white_on_red",
                                        },
                                        new Datadog.Inputs.ScreenBoardWidgetTileDefRequestConditionalFormatArgs
                                        {
                                            Comparator = ">=",
                                            Value = "2",
                                            Palette = "white_on_yellow",
                                        },
                                    },
                                    Aggregator = "max",
                                },
                            },
                            CustomUnit = "%",
                            Autoscale = false,
                            Precision = "6",
                            TextAlign = "right",
                        },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "toplist",
                    X = 65,
                    Y = 5,
                    Title = "toplist title terraform",
                    Legend = true,
                    LegendSize = "auto",
                    Time = 
                    {
                        { "live_span", "1d" },
                    },
                    TileDeves = 
                    {
                        new Datadog.Inputs.ScreenBoardWidgetTileDefArgs
                        {
                            Viz = "toplist",
                            Requests = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    Q = "top(avg:system.load.1{*} by {host}, 10, 'mean', 'desc')",
                                    Style = 
                                    {
                                        { "palette", "purple" },
                                        { "type", "dashed" },
                                        { "width", "thin" },
                                    },
                                    ConditionalFormats = 
                                    {
                                        new Datadog.Inputs.ScreenBoardWidgetTileDefRequestConditionalFormatArgs
                                        {
                                            Comparator = ">",
                                            Value = "4",
                                            Palette = "white_on_green",
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "change",
                    X = 85,
                    Y = 5,
                    Title = "change title terraform",
                    TileDeves = 
                    {
                        new Datadog.Inputs.ScreenBoardWidgetTileDefArgs
                        {
                            Viz = "change",
                            Requests = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    Q = "min:system.load.1{*} by {host}",
                                    CompareTo = "week_before",
                                    ChangeType = "relative",
                                    OrderBy = "present",
                                    OrderDir = "asc",
                                    ExtraCol = "",
                                    IncreaseGood = false,
                                },
                            },
                        },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "event_timeline",
                    X = 105,
                    Y = 5,
                    Title = "event_timeline title terraform",
                    Query = "status:error",
                    Time = 
                    {
                        { "live_span", "1d" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "event_stream",
                    X = 115,
                    Y = 5,
                    Title = "event_stream title terraform",
                    Query = "*",
                    EventSize = "l",
                    Time = 
                    {
                        { "live_span", "4h" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "image",
                    X = 145,
                    Y = 5,
                    Title = "image title terraform",
                    Sizing = "fit",
                    Margin = "large",
                    Url = "https://datadog-prod.imgix.net/img/dd_logo_70x75.png",
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "note",
                    X = 165,
                    Y = 5,
                    Bgcolor = "pink",
                    TextAlign = "right",
                    FontSize = "36",
                    Tick = true,
                    TickEdge = "bottom",
                    TickPos = "50%",
                    Html = "<b>test note</b>",
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "alert_graph",
                    X = 185,
                    Y = 5,
                    Title = "alert graph title terraform",
                    AlertId = 123456,
                    VizType = "toplist",
                    Time = 
                    {
                        { "live_span", "15m" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "alert_value",
                    X = 205,
                    Y = 5,
                    Title = "alert value title terraform",
                    AlertId = 123456,
                    TextSize = "fill_height",
                    TextAlign = "right",
                    Precision = "*",
                    Unit = "b",
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "iframe",
                    X = 225,
                    Y = 5,
                    Url = "https://www.datadoghq.org",
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "check_status",
                    X = 245,
                    Y = 5,
                    Title = "test title",
                    TitleAlign = "left",
                    Grouping = "check",
                    Check = "aws.ecs.agent_connected",
                    Tags = 
                    {
                        "*",
                    },
                    Group = "cluster:test",
                    Time = 
                    {
                        { "live_span", "30m" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "trace_service",
                    X = 265,
                    Y = 5,
                    Env = "testEnv",
                    ServiceService = "",
                    ServiceName = "",
                    SizeVersion = "large",
                    LayoutVersion = "three_column",
                    MustShowHits = true,
                    MustShowErrors = true,
                    MustShowLatency = true,
                    MustShowBreakdown = true,
                    MustShowDistribution = true,
                    MustShowResourceList = true,
                    Time = 
                    {
                        { "live_span", "30m" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "hostmap",
                    X = 285,
                    Y = 5,
                    Query = "avg:system.load.1{*} by {host}",
                    TileDeves = 
                    {
                        new Datadog.Inputs.ScreenBoardWidgetTileDefArgs
                        {
                            Viz = "hostmap",
                            NodeType = "container",
                            Scopes = 
                            {
                                "datacenter:test",
                            },
                            Groups = 
                            {
                                "pod_name",
                            },
                            NoGroupHosts = false,
                            NoMetricHosts = false,
                            Requests = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    Q = "max:process.stat.container.io.wbps{datacenter:test} by {host}",
                                    Type = "fill",
                                },
                            },
                            Style = 
                            {
                                { "palette", "hostmap_blues" },
                                { "palette_flip", true },
                                { "fill_min", 20 },
                                { "fill_max", 300 },
                            },
                        },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "manage_status",
                    X = 305,
                    Y = 5,
                    SummaryType = "monitors",
                    DisplayFormat = "countsAndList",
                    ColorPreference = "background",
                    HideZeroCounts = true,
                    ShowLastTriggered = false,
                    ManageStatusShowTitle = false,
                    ManageStatusTitleText = "test title",
                    ManageStatusTitleSize = "20",
                    ManageStatusTitleAlign = "right",
                    Params = 
                    {
                        { "sort", "status,asc" },
                        { "text", "status:alert" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "log_stream",
                    X = 325,
                    Y = 5,
                    Query = "source:kubernetes",
                    Columns = "[\"column1\",\"column2\",\"column3\"]",
                    Logset = "1234",
                    Time = 
                    {
                        { "live_span", "1h" },
                    },
                },
                new Datadog.Inputs.ScreenBoardWidgetArgs
                {
                    Type = "process",
                    X = 365,
                    Y = 5,
                    TileDeves = 
                    {
                        new Datadog.Inputs.ScreenBoardWidgetTileDefArgs
                        {
                            Viz = "process",
                            Requests = 
                            {
                                new Datadog.Inputs.ScreenBoardWidgetTileDefRequestArgs
                                {
                                    QueryType = "process",
                                    Metric = "process.stat.cpu.total_pct",
                                    TextFilter = "",
                                    TagFilters = {},
                                    Limit = 200,
                                    Style = 
                                    {
                                        { "palette", "dog_classic_area" },
                                    },
                                },
                            },
                        },
                    },
                },
            },
        });
    }

}

Coming soon!

import pulumi
import json
import pulumi_datadog as datadog

# Create a new Datadog screenboard
acceptance_test = datadog.ScreenBoard("acceptanceTest",
    title="Test Screenboard",
    read_only=True,
    template_variables=[
        datadog.ScreenBoardTemplateVariableArgs(
            name="varname 1",
            prefix="pod_name",
            default="*",
        ),
        datadog.ScreenBoardTemplateVariableArgs(
            name="varname 2",
            prefix="service_name",
            default="autoscaling",
        ),
    ],
    widgets=[
        datadog.ScreenBoardWidgetArgs(
            type="free_text",
            x=5,
            y=5,
            text="test text",
            text_align="right",
            font_size="36",
            color="#ffc0cb",
        ),
        datadog.ScreenBoardWidgetArgs(
            type="timeseries",
            x=25,
            y=5,
            title="graph title terraform",
            title_size=16,
            title_align="right",
            legend=True,
            legend_size="16",
            time={
                "live_span": "1d",
            },
            tile_deves=[datadog.ScreenBoardWidgetTileDefArgs(
                viz="timeseries",
                requests=[
                    datadog.ScreenBoardWidgetTileDefRequestArgs(
                        q="avg:system.cpu.user{*}",
                        type="line",
                        style={
                            "palette": "purple",
                            "type": "dashed",
                            "width": "thin",
                        },
                        metadata_json=json.dumps({
                            "avg:system.cpu.user{*}": {
                                "alias": "CPU Usage",
                            },
                        }),
                    ),
                    datadog.ScreenBoardWidgetTileDefRequestArgs(
                        log_query=datadog.ScreenBoardWidgetTileDefRequestLogQueryArgs(
                            index="mcnulty",
                            compute=datadog.ScreenBoardWidgetTileDefRequestLogQueryComputeArgs(
                                aggregation="avg",
                                facet="@duration",
                                interval="5000",
                            ),
                            search=datadog.ScreenBoardWidgetTileDefRequestLogQuerySearchArgs(
                                query="status:info",
                            ),
                            group_bies=[{
                                "facet": "host",
                                "limit": 10,
                                "sort": {
                                    "aggregation": "avg",
                                    "order": "desc",
                                    "facet": "@duration",
                                },
                            }],
                        ),
                        type="area",
                    ),
                    datadog.ScreenBoardWidgetTileDefRequestArgs(
                        apm_query=datadog.ScreenBoardWidgetTileDefRequestApmQueryArgs(
                            index="apm-search",
                            compute=datadog.ScreenBoardWidgetTileDefRequestApmQueryComputeArgs(
                                aggregation="avg",
                                facet="@duration",
                                interval="5000",
                            ),
                            search=datadog.ScreenBoardWidgetTileDefRequestApmQuerySearchArgs(
                                query="type:web",
                            ),
                            group_bies=[{
                                "facet": "resource_name",
                                "limit": 50,
                                "sort": {
                                    "aggregation": "avg",
                                    "order": "desc",
                                    "facet": "@string_query.interval",
                                },
                            }],
                        ),
                        type="bars",
                    ),
                    datadog.ScreenBoardWidgetTileDefRequestArgs(
                        process_query=datadog.ScreenBoardWidgetTileDefRequestProcessQueryArgs(
                            metric="process.stat.cpu.total_pct",
                            search_by="error",
                            filter_bies=["active"],
                            limit=50,
                        ),
                        type="area",
                    ),
                ],
                markers=[datadog.ScreenBoardWidgetTileDefMarkerArgs(
                    label="test marker",
                    type="error dashed",
                    value="y < 6",
                )],
                events=[datadog.ScreenBoardWidgetTileDefEventArgs(
                    q="test event",
                )],
            )],
        ),
        datadog.ScreenBoardWidgetArgs(
            type="query_value",
            x=45,
            y=25,
            title="query value title terraform",
            title_size=20,
            title_align="center",
            legend=True,
            legend_size="16",
            tile_deves=[datadog.ScreenBoardWidgetTileDefArgs(
                viz="query_value",
                requests=[datadog.ScreenBoardWidgetTileDefRequestArgs(
                    q="avg:system.cpu.user{*}",
                    type="line",
                    style={
                        "palette": "purple",
                        "type": "dashed",
                        "width": "thin",
                    },
                    conditional_formats=[
                        datadog.ScreenBoardWidgetTileDefRequestConditionalFormatArgs(
                            comparator=">",
                            value="1",
                            palette="white_on_red",
                        ),
                        datadog.ScreenBoardWidgetTileDefRequestConditionalFormatArgs(
                            comparator=">=",
                            value="2",
                            palette="white_on_yellow",
                        ),
                    ],
                    aggregator="max",
                )],
                custom_unit="%",
                autoscale=False,
                precision="6",
                text_align="right",
            )],
        ),
        datadog.ScreenBoardWidgetArgs(
            type="toplist",
            x=65,
            y=5,
            title="toplist title terraform",
            legend=True,
            legend_size="auto",
            time={
                "live_span": "1d",
            },
            tile_deves=[datadog.ScreenBoardWidgetTileDefArgs(
                viz="toplist",
                requests=[datadog.ScreenBoardWidgetTileDefRequestArgs(
                    q="top(avg:system.load.1{*} by {host}, 10, 'mean', 'desc')",
                    style={
                        "palette": "purple",
                        "type": "dashed",
                        "width": "thin",
                    },
                    conditional_formats=[datadog.ScreenBoardWidgetTileDefRequestConditionalFormatArgs(
                        comparator=">",
                        value="4",
                        palette="white_on_green",
                    )],
                )],
            )],
        ),
        datadog.ScreenBoardWidgetArgs(
            type="change",
            x=85,
            y=5,
            title="change title terraform",
            tile_deves=[datadog.ScreenBoardWidgetTileDefArgs(
                viz="change",
                requests=[datadog.ScreenBoardWidgetTileDefRequestArgs(
                    q="min:system.load.1{*} by {host}",
                    compare_to="week_before",
                    change_type="relative",
                    order_by="present",
                    order_dir="asc",
                    extra_col="",
                    increase_good=False,
                )],
            )],
        ),
        datadog.ScreenBoardWidgetArgs(
            type="event_timeline",
            x=105,
            y=5,
            title="event_timeline title terraform",
            query="status:error",
            time={
                "live_span": "1d",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="event_stream",
            x=115,
            y=5,
            title="event_stream title terraform",
            query="*",
            event_size="l",
            time={
                "live_span": "4h",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="image",
            x=145,
            y=5,
            title="image title terraform",
            sizing="fit",
            margin="large",
            url="https://datadog-prod.imgix.net/img/dd_logo_70x75.png",
        ),
        datadog.ScreenBoardWidgetArgs(
            type="note",
            x=165,
            y=5,
            bgcolor="pink",
            text_align="right",
            font_size="36",
            tick=True,
            tick_edge="bottom",
            tick_pos="50%",
            html="<b>test note</b>",
        ),
        datadog.ScreenBoardWidgetArgs(
            type="alert_graph",
            x=185,
            y=5,
            title="alert graph title terraform",
            alert_id=123456,
            viz_type="toplist",
            time={
                "live_span": "15m",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="alert_value",
            x=205,
            y=5,
            title="alert value title terraform",
            alert_id=123456,
            text_size="fill_height",
            text_align="right",
            precision="*",
            unit="b",
        ),
        datadog.ScreenBoardWidgetArgs(
            type="iframe",
            x=225,
            y=5,
            url="https://www.datadoghq.org",
        ),
        datadog.ScreenBoardWidgetArgs(
            type="check_status",
            x=245,
            y=5,
            title="test title",
            title_align="left",
            grouping="check",
            check="aws.ecs.agent_connected",
            tags=["*"],
            group="cluster:test",
            time={
                "live_span": "30m",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="trace_service",
            x=265,
            y=5,
            env="testEnv",
            service_service="",
            service_name="",
            size_version="large",
            layout_version="three_column",
            must_show_hits=True,
            must_show_errors=True,
            must_show_latency=True,
            must_show_breakdown=True,
            must_show_distribution=True,
            must_show_resource_list=True,
            time={
                "live_span": "30m",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="hostmap",
            x=285,
            y=5,
            query="avg:system.load.1{*} by {host}",
            tile_deves=[datadog.ScreenBoardWidgetTileDefArgs(
                viz="hostmap",
                node_type="container",
                scopes=["datacenter:test"],
                groups=["pod_name"],
                no_group_hosts=False,
                no_metric_hosts=False,
                requests=[datadog.ScreenBoardWidgetTileDefRequestArgs(
                    q="max:process.stat.container.io.wbps{datacenter:test} by {host}",
                    type="fill",
                )],
                style={
                    "palette": "hostmap_blues",
                    "palette_flip": True,
                    "fill_min": 20,
                    "fill_max": 300,
                },
            )],
        ),
        datadog.ScreenBoardWidgetArgs(
            type="manage_status",
            x=305,
            y=5,
            summary_type="monitors",
            display_format="countsAndList",
            color_preference="background",
            hide_zero_counts=True,
            show_last_triggered=False,
            manage_status_show_title=False,
            manage_status_title_text="test title",
            manage_status_title_size="20",
            manage_status_title_align="right",
            params={
                "sort": "status,asc",
                "text": "status:alert",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="log_stream",
            x=325,
            y=5,
            query="source:kubernetes",
            columns="[\"column1\",\"column2\",\"column3\"]",
            logset="1234",
            time={
                "live_span": "1h",
            },
        ),
        datadog.ScreenBoardWidgetArgs(
            type="process",
            x=365,
            y=5,
            tile_deves=[datadog.ScreenBoardWidgetTileDefArgs(
                viz="process",
                requests=[datadog.ScreenBoardWidgetTileDefRequestArgs(
                    query_type="process",
                    metric="process.stat.cpu.total_pct",
                    text_filter="",
                    tag_filters=[],
                    limit=200,
                    style={
                        "palette": "dog_classic_area",
                    },
                )],
            )],
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

// Create a new Datadog screenboard
const acceptanceTest = new datadog.ScreenBoard("acceptanceTest", {
    title: "Test Screenboard",
    readOnly: true,
    templateVariables: [
        {
            name: "varname 1",
            prefix: "pod_name",
            "default": "*",
        },
        {
            name: "varname 2",
            prefix: "service_name",
            "default": "autoscaling",
        },
    ],
    widgets: [
        {
            type: "free_text",
            x: 5,
            y: 5,
            text: "test text",
            textAlign: "right",
            fontSize: "36",
            color: "#ffc0cb",
        },
        {
            type: "timeseries",
            x: 25,
            y: 5,
            title: "graph title terraform",
            titleSize: 16,
            titleAlign: "right",
            legend: true,
            legendSize: 16,
            time: {
                live_span: "1d",
            },
            tileDeves: [{
                viz: "timeseries",
                requests: [
                    {
                        q: "avg:system.cpu.user{*}",
                        type: "line",
                        style: {
                            palette: "purple",
                            type: "dashed",
                            width: "thin",
                        },
                        metadataJson: JSON.stringify({
                            "avg:system.cpu.user{*}": {
                                alias: "CPU Usage",
                            },
                        }),
                    },
                    {
                        logQuery: {
                            index: "mcnulty",
                            compute: {
                                aggregation: "avg",
                                facet: "@duration",
                                interval: 5000,
                            },
                            search: {
                                query: "status:info",
                            },
                            groupBies: [{
                                facet: "host",
                                limit: 10,
                                sort: {
                                    aggregation: "avg",
                                    order: "desc",
                                    facet: "@duration",
                                },
                            }],
                        },
                        type: "area",
                    },
                    {
                        apmQuery: {
                            index: "apm-search",
                            compute: {
                                aggregation: "avg",
                                facet: "@duration",
                                interval: 5000,
                            },
                            search: {
                                query: "type:web",
                            },
                            groupBies: [{
                                facet: "resource_name",
                                limit: 50,
                                sort: {
                                    aggregation: "avg",
                                    order: "desc",
                                    facet: "@string_query.interval",
                                },
                            }],
                        },
                        type: "bars",
                    },
                    {
                        processQuery: {
                            metric: "process.stat.cpu.total_pct",
                            searchBy: "error",
                            filterBies: ["active"],
                            limit: 50,
                        },
                        type: "area",
                    },
                ],
                markers: [{
                    label: "test marker",
                    type: "error dashed",
                    value: "y < 6",
                }],
                events: [{
                    q: "test event",
                }],
            }],
        },
        {
            type: "query_value",
            x: 45,
            y: 25,
            title: "query value title terraform",
            titleSize: 20,
            titleAlign: "center",
            legend: true,
            legendSize: 16,
            tileDeves: [{
                viz: "query_value",
                requests: [{
                    q: "avg:system.cpu.user{*}",
                    type: "line",
                    style: {
                        palette: "purple",
                        type: "dashed",
                        width: "thin",
                    },
                    conditionalFormats: [
                        {
                            comparator: ">",
                            value: "1",
                            palette: "white_on_red",
                        },
                        {
                            comparator: ">=",
                            value: "2",
                            palette: "white_on_yellow",
                        },
                    ],
                    aggregator: "max",
                }],
                customUnit: "%",
                autoscale: false,
                precision: "6",
                textAlign: "right",
            }],
        },
        {
            type: "toplist",
            x: 65,
            y: 5,
            title: "toplist title terraform",
            legend: true,
            legendSize: "auto",
            time: {
                live_span: "1d",
            },
            tileDeves: [{
                viz: "toplist",
                requests: [{
                    q: "top(avg:system.load.1{*} by {host}, 10, 'mean', 'desc')",
                    style: {
                        palette: "purple",
                        type: "dashed",
                        width: "thin",
                    },
                    conditionalFormats: [{
                        comparator: ">",
                        value: "4",
                        palette: "white_on_green",
                    }],
                }],
            }],
        },
        {
            type: "change",
            x: 85,
            y: 5,
            title: "change title terraform",
            tileDeves: [{
                viz: "change",
                requests: [{
                    q: "min:system.load.1{*} by {host}",
                    compareTo: "week_before",
                    changeType: "relative",
                    orderBy: "present",
                    orderDir: "asc",
                    extraCol: "",
                    increaseGood: false,
                }],
            }],
        },
        {
            type: "event_timeline",
            x: 105,
            y: 5,
            title: "event_timeline title terraform",
            query: "status:error",
            time: {
                live_span: "1d",
            },
        },
        {
            type: "event_stream",
            x: 115,
            y: 5,
            title: "event_stream title terraform",
            query: "*",
            eventSize: "l",
            time: {
                live_span: "4h",
            },
        },
        {
            type: "image",
            x: 145,
            y: 5,
            title: "image title terraform",
            sizing: "fit",
            margin: "large",
            url: "https://datadog-prod.imgix.net/img/dd_logo_70x75.png",
        },
        {
            type: "note",
            x: 165,
            y: 5,
            bgcolor: "pink",
            textAlign: "right",
            fontSize: "36",
            tick: true,
            tickEdge: "bottom",
            tickPos: `50%`,
            html: "<b>test note</b>",
        },
        {
            type: "alert_graph",
            x: 185,
            y: 5,
            title: "alert graph title terraform",
            alertId: "123456",
            vizType: "toplist",
            time: {
                live_span: "15m",
            },
        },
        {
            type: "alert_value",
            x: 205,
            y: 5,
            title: "alert value title terraform",
            alertId: "123456",
            textSize: "fill_height",
            textAlign: "right",
            precision: "*",
            unit: "b",
        },
        {
            type: "iframe",
            x: 225,
            y: 5,
            url: "https://www.datadoghq.org",
        },
        {
            type: "check_status",
            x: 245,
            y: 5,
            title: "test title",
            titleAlign: "left",
            grouping: "check",
            check: "aws.ecs.agent_connected",
            tags: ["*"],
            group: "cluster:test",
            time: {
                live_span: "30m",
            },
        },
        {
            type: "trace_service",
            x: 265,
            y: 5,
            env: "testEnv",
            serviceService: "",
            serviceName: "",
            sizeVersion: "large",
            layoutVersion: "three_column",
            mustShowHits: true,
            mustShowErrors: true,
            mustShowLatency: true,
            mustShowBreakdown: true,
            mustShowDistribution: true,
            mustShowResourceList: true,
            time: {
                live_span: "30m",
            },
        },
        {
            type: "hostmap",
            x: 285,
            y: 5,
            query: "avg:system.load.1{*} by {host}",
            tileDeves: [{
                viz: "hostmap",
                nodeType: "container",
                scopes: ["datacenter:test"],
                groups: ["pod_name"],
                noGroupHosts: false,
                noMetricHosts: false,
                requests: [{
                    q: "max:process.stat.container.io.wbps{datacenter:test} by {host}",
                    type: "fill",
                }],
                style: {
                    palette: "hostmap_blues",
                    palette_flip: true,
                    fill_min: 20,
                    fill_max: 300,
                },
            }],
        },
        {
            type: "manage_status",
            x: 305,
            y: 5,
            summaryType: "monitors",
            displayFormat: "countsAndList",
            colorPreference: "background",
            hideZeroCounts: true,
            showLastTriggered: false,
            manageStatusShowTitle: false,
            manageStatusTitleText: "test title",
            manageStatusTitleSize: "20",
            manageStatusTitleAlign: "right",
            params: {
                sort: "status,asc",
                text: "status:alert",
            },
        },
        {
            type: "log_stream",
            x: 325,
            y: 5,
            query: "source:kubernetes",
            columns: "[\"column1\",\"column2\",\"column3\"]",
            logset: "1234",
            time: {
                live_span: "1h",
            },
        },
        {
            type: "process",
            x: 365,
            y: 5,
            tileDeves: [{
                viz: "process",
                requests: [{
                    queryType: "process",
                    metric: "process.stat.cpu.total_pct",
                    textFilter: "",
                    tagFilters: [],
                    limit: 200,
                    style: {
                        palette: "dog_classic_area",
                    },
                }],
            }],
        },
    ],
});

Create a ScreenBoard Resource

new ScreenBoard(name: string, args: ScreenBoardArgs, opts?: CustomResourceOptions);
def ScreenBoard(resource_name: str, opts: Optional[ResourceOptions] = None, height: Optional[str] = None, read_only: Optional[bool] = None, shared: Optional[bool] = None, template_variables: Optional[Sequence[ScreenBoardTemplateVariableArgs]] = None, title: Optional[str] = None, widgets: Optional[Sequence[ScreenBoardWidgetArgs]] = None, width: Optional[str] = None)
func NewScreenBoard(ctx *Context, name string, args ScreenBoardArgs, opts ...ResourceOption) (*ScreenBoard, error)
public ScreenBoard(string name, ScreenBoardArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ScreenBoardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ScreenBoardArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ScreenBoardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ScreenBoard Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ScreenBoard resource accepts the following input properties:

Title string

Name of the screenboard

Widgets List<ScreenBoardWidgetArgs>

A list of widget definitions.

Height string

Height of the screenboard

ReadOnly bool

The read-only status of the screenboard. Default is false.

Shared bool

Whether the screenboard is shared or not

TemplateVariables List<ScreenBoardTemplateVariableArgs>

A list of template variables for using Dashboard templating.

Width string

Width of the screenboard

Title string

Name of the screenboard

Widgets []ScreenBoardWidget

A list of widget definitions.

Height string

Height of the screenboard

ReadOnly bool

The read-only status of the screenboard. Default is false.

Shared bool

Whether the screenboard is shared or not

TemplateVariables []ScreenBoardTemplateVariable

A list of template variables for using Dashboard templating.

Width string

Width of the screenboard

title string

Name of the screenboard

widgets ScreenBoardWidget[]

A list of widget definitions.

height string

Height of the screenboard

readOnly boolean

The read-only status of the screenboard. Default is false.

shared boolean

Whether the screenboard is shared or not

templateVariables ScreenBoardTemplateVariable[]

A list of template variables for using Dashboard templating.

width string

Width of the screenboard

title str

Name of the screenboard

widgets Sequence[ScreenBoardWidgetArgs]

A list of widget definitions.

height str

Height of the screenboard

read_only bool

The read-only status of the screenboard. Default is false.

shared bool

Whether the screenboard is shared or not

template_variables Sequence[ScreenBoardTemplateVariableArgs]

A list of template variables for using Dashboard templating.

width str

Width of the screenboard

Outputs

All input properties are implicitly available as output properties. Additionally, the ScreenBoard resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ScreenBoard Resource

Get an existing ScreenBoard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ScreenBoardState, opts?: CustomResourceOptions): ScreenBoard
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, height: Optional[str] = None, read_only: Optional[bool] = None, shared: Optional[bool] = None, template_variables: Optional[Sequence[ScreenBoardTemplateVariableArgs]] = None, title: Optional[str] = None, widgets: Optional[Sequence[ScreenBoardWidgetArgs]] = None, width: Optional[str] = None) -> ScreenBoard
func GetScreenBoard(ctx *Context, name string, id IDInput, state *ScreenBoardState, opts ...ResourceOption) (*ScreenBoard, error)
public static ScreenBoard Get(string name, Input<string> id, ScreenBoardState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Height string

Height of the screenboard

ReadOnly bool

The read-only status of the screenboard. Default is false.

Shared bool

Whether the screenboard is shared or not

TemplateVariables List<ScreenBoardTemplateVariableArgs>

A list of template variables for using Dashboard templating.

Title string

Name of the screenboard

Widgets List<ScreenBoardWidgetArgs>

A list of widget definitions.

Width string

Width of the screenboard

Height string

Height of the screenboard

ReadOnly bool

The read-only status of the screenboard. Default is false.

Shared bool

Whether the screenboard is shared or not

TemplateVariables []ScreenBoardTemplateVariable

A list of template variables for using Dashboard templating.

Title string

Name of the screenboard

Widgets []ScreenBoardWidget

A list of widget definitions.

Width string

Width of the screenboard

height string

Height of the screenboard

readOnly boolean

The read-only status of the screenboard. Default is false.

shared boolean

Whether the screenboard is shared or not

templateVariables ScreenBoardTemplateVariable[]

A list of template variables for using Dashboard templating.

title string

Name of the screenboard

widgets ScreenBoardWidget[]

A list of widget definitions.

width string

Width of the screenboard

height str

Height of the screenboard

read_only bool

The read-only status of the screenboard. Default is false.

shared bool

Whether the screenboard is shared or not

template_variables Sequence[ScreenBoardTemplateVariableArgs]

A list of template variables for using Dashboard templating.

title str

Name of the screenboard

widgets Sequence[ScreenBoardWidgetArgs]

A list of widget definitions.

width str

Width of the screenboard

Supporting Types

ScreenBoardTemplateVariable

Name string
Default string
Prefix string
Name string
Default string
Prefix string
name string
default string
prefix string
name str
default str
prefix str

ScreenBoardWidget

Type string
X int
Y int
AlertId int
AutoRefresh bool
Bgcolor string
Check string
Color string
ColorPreference string
Columns string
DisplayFormat string
Env string
EventSize string
FontSize string
Group string
GroupBies List<string>
Grouping string
Height int
HideZeroCounts bool
Html string
LayoutVersion string
Legend bool
LegendSize string
Logset string
ManageStatusShowTitle bool
ManageStatusTitleAlign string
ManageStatusTitleSize string
ManageStatusTitleText string
Margin string
Monitor Dictionary<string, string>
MustShowBreakdown bool
MustShowDistribution bool
MustShowErrors bool
MustShowHits bool
MustShowLatency bool
MustShowResourceList bool
Params Dictionary<string, string>
Precision string
Query string
Rules List<ScreenBoardWidgetRuleArgs>
ServiceName string
ServiceService string
ShowLastTriggered bool
SizeVersion string
Sizing string
SummaryType string
Tags List<string>
Text string
TextAlign string
TextSize string
Tick bool
TickEdge string
TickPos string
TileDeves List<ScreenBoardWidgetTileDefArgs>
Time Dictionary<string, string>
Timeframes List<string>
Title string
TitleAlign string
TitleSize int
Unit string
Url string
VizType string
Width int
Type string
X int
Y int
AlertId int
AutoRefresh bool
Bgcolor string
Check string
Color string
ColorPreference string
Columns string
DisplayFormat string
Env string
EventSize string
FontSize string
Group string
GroupBies []string
Grouping string
Height int
HideZeroCounts bool
Html string
LayoutVersion string
Legend bool
LegendSize string
Logset string
ManageStatusShowTitle bool
ManageStatusTitleAlign string
ManageStatusTitleSize string
ManageStatusTitleText string
Margin string
Monitor map[string]string
MustShowBreakdown bool
MustShowDistribution bool
MustShowErrors bool
MustShowHits bool
MustShowLatency bool
MustShowResourceList bool
Params map[string]string
Precision string
Query string
Rules []ScreenBoardWidgetRule
ServiceName string
ServiceService string
ShowLastTriggered bool
SizeVersion string
Sizing string
SummaryType string
Tags []string
Text string
TextAlign string
TextSize string
Tick bool
TickEdge string
TickPos string
TileDeves []ScreenBoardWidgetTileDef
Time map[string]string
Timeframes []string
Title string
TitleAlign string
TitleSize int
Unit string
Url string
VizType string
Width int
type string
x number
y number
alertId number
autoRefresh boolean
bgcolor string
check string
color string
colorPreference string
columns string
displayFormat string
env string
eventSize string
fontSize string
group string
groupBies string[]
grouping string
height number
hideZeroCounts boolean
html string
layoutVersion string
legend boolean
legendSize string
logset string
manageStatusShowTitle boolean
manageStatusTitleAlign string
manageStatusTitleSize string
manageStatusTitleText string
margin string
monitor {[key: string]: string}
mustShowBreakdown boolean
mustShowDistribution boolean
mustShowErrors boolean
mustShowHits boolean
mustShowLatency boolean
mustShowResourceList boolean
params {[key: string]: string}
precision string
query string
rules ScreenBoardWidgetRule[]
serviceName string
serviceService string
showLastTriggered boolean
sizeVersion string
sizing string
summaryType string
tags string[]
text string
textAlign string
textSize string
tick boolean
tickEdge string
tickPos string
tileDeves ScreenBoardWidgetTileDef[]
time {[key: string]: string}
timeframes string[]
title string
titleAlign string
titleSize number
unit string
url string
vizType string
width number
type str
x int
y int
alert_id int
auto_refresh bool
bgcolor str
check str
color str
color_preference str
columns str
display_format str
env str
event_size str
font_size str
group str
group_bies Sequence[str]
grouping str
height int
hide_zero_counts bool
html str
layout_version str
legend bool
legend_size str
logset str
manage_status_show_title bool
manage_status_title_align str
manage_status_title_size str
manage_status_title_text str
margin str
monitor Mapping[str, str]
must_show_breakdown bool
must_show_distribution bool
must_show_errors bool
must_show_hits bool
must_show_latency bool
must_show_resource_list bool
params Mapping[str, str]
precision str
query str
rules Sequence[ScreenBoardWidgetRuleArgs]
service_name str
service_service str
show_last_triggered bool
size_version str
sizing str
summary_type str
tags Sequence[str]
text str
text_align str
text_size str
tick bool
tick_edge str
tick_pos str
tile_deves Sequence[ScreenBoardWidgetTileDefArgs]
time Mapping[str, str]
timeframes Sequence[str]
title str
title_align str
title_size int
unit str
url str
viz_type str
width int

ScreenBoardWidgetRule

Color string
Threshold double
Timeframe string
Color string
Threshold float64
Timeframe string
color string
threshold number
timeframe string

ScreenBoardWidgetTileDef

ScreenBoardWidgetTileDefEvent

Q string
Q string
q string
q str

ScreenBoardWidgetTileDefMarker

Type string
Value string
Label string
Type string
Value string
Label string
type string
value string
label string
type str
value str
label str

ScreenBoardWidgetTileDefRequest

ScreenBoardWidgetTileDefRequestApmQuery

ScreenBoardWidgetTileDefRequestApmQueryCompute

Aggregation string
Facet string
Interval string
Aggregation string
Facet string
Interval string
aggregation string
facet string
interval string

ScreenBoardWidgetTileDefRequestApmQueryGroupBy

ScreenBoardWidgetTileDefRequestApmQueryGroupBySort

Aggregation string
Order string
Facet string
Aggregation string
Order string
Facet string
aggregation string
order string
facet string

ScreenBoardWidgetTileDefRequestApmQuerySearch

Query string
Query string
query string
query str

ScreenBoardWidgetTileDefRequestConditionalFormat

Comparator string
Color string
CustomBgColor string
Invert bool
Palette string
Value string
Comparator string
Color string
CustomBgColor string
Invert bool
Palette string
Value string
comparator string
color string
customBgColor string
invert boolean
palette string
value string

ScreenBoardWidgetTileDefRequestLogQuery

ScreenBoardWidgetTileDefRequestLogQueryCompute

Aggregation string
Facet string
Interval string
Aggregation string
Facet string
Interval string
aggregation string
facet string
interval string

ScreenBoardWidgetTileDefRequestLogQueryGroupBy

ScreenBoardWidgetTileDefRequestLogQueryGroupBySort

Aggregation string
Order string
Facet string
Aggregation string
Order string
Facet string
aggregation string
order string
facet string

ScreenBoardWidgetTileDefRequestLogQuerySearch

Query string
Query string
query string
query str

ScreenBoardWidgetTileDefRequestProcessQuery

Metric string
FilterBies List<string>
Limit int
SearchBy string
Metric string
FilterBies []string
Limit int
SearchBy string
metric string
filterBies string[]
limit number
searchBy string
metric str
filter_bies Sequence[str]
limit int
search_by str

Import

screenboards can be imported using their numeric ID, e.g.

 $ pulumi import datadog:index/screenBoard:ScreenBoard my_service_screenboard 2081

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.