SumoLogic

v0.10.0 published on Wednesday, Sep 21, 2022 by Pulumi

Dashboard

Provides a [Sumologic Dashboard (New)][1].

Attributes reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the dashboard.

Schema for topology_label_map

  • data - (Block List, Required) A list of blocks containing label and it’s values.
      • label - (Required) The name of the topology label.
      • values - (Required) The values for the topology label.

Schema for time_range

  • complete_literal_time_range - (Block List, Max: 1, Optional) Literal time range. See complete_literal_time_range schema for details.
  • begin_bounded_time_range - (Block List, Max: 1, Optional) Bounded time range. See begin_bounded_time_range schema schema for details. schema for details.

Schema for complete_literal_time_range

  • range_name - (Required) Name of complete literal time range. One of today, yesterday, previous_week, previous_month.

Schema for begin_bounded_time_range

  • from - (Block List, Max: 1, Required) Start boundary of bounded time range. See time_range_boundary schema for details.
  • to - (Block List, Max: 1, Optional) End boundary of bounded time range. See time_range_boundary schema for details.

Schema for time_range_boundary

  • epoch_time_range - (Block List, Optional) Time since the epoch.

    • epoch_millis - (Required) Time as a number of milliseconds since the epoch.
  • iso8601_time_range - (Block List, Optional) Time in ISO 8601 format.

    • iso8601_time - (Required) Time as a string in ISO 8601 format.
  • relative_time_range - (Block List, Optional) Time in relative format.

    • relative_time - (Required) Relative time as a string consisting of following elements:

      1. - (optional): minus sign indicates time in the past,
      2. <number>: number of time units,
      3. <time_unit>: time unit; possible values are: w (week), d (day), h (hour), m (minute), s (second).

      Multiple pairs of <number><time_unit> may be provided, and they may be in any order. For example, -2w5d3h points to the moment in time 2 weeks, 5 days and 3 hours ago.

  • literal_time_range - (Block List, Optional) Time in literal format.

    • range_name - (Required) One of now, second, minute, hour, day, today, week, month, year.

Schema for panel

  • text_panel - (Block List, Max: 1, Optional) A text panel. See text_panel schema for details.
  • sumo_search_panel - (Block List, Max: 1, Optional) A search panel. See sumo_search_panel schema for details.

Schema for text_panel

  • key - (Required) Key for the panel. Used to create searches for the queries in the panel and configure the layout of the panel in the dashboard.
  • title - (Optional) Title of the panel.
  • visual_settings - (Optional) Visual settings of the panel.
  • keep_visual_settings_consistent_with_parent - (Optional) Keeps the visual settings, like series colors, consistent with the settings of the parent panel.
  • text - (Required) Text to display in the panel.

Schema for sumo_search_panel

  • key - (Required) Key for the panel. Used to create searches for the queries in the panel and configure the layout of the panel in the dashboard.
  • title - (Optional) Title of the panel.
  • visual_settings - (Optional) Visual settings of the panel.
  • keep_visual_settings_consistent_with_parent - (Optional) Keeps the visual settings, like series colors, consistent with the settings of the parent panel.
  • query - (Block List, Required) A list of queries for the panel. Can be log or metric query. See query schema for details.
  • description - (Optional) Description of the panel.
  • time_range - (Block List, Max: 1, Optional) Time range of the panel. See time_range schema for details.
  • linked_dashboard - (Block List, Optional) A list of linked dashboards. See linked_dashboard schema for details.

Schema for query

  • query_string - (Required) The metrics or logs query.
  • query_type - (Required) The type of the query. One of Metrics or Logs.
  • query_key - (Required) The key for metric or log query. Used as an identifier for queries.
  • metric_query_mode - (Optional) Should only be specified for metric query. The mode of the metric query. One of Basic or Advanced.
  • metric_query_data - (Optional) Should only be specified for metric query. Data format for the metric query. See metric_query_data schema for details.

Schema for metric_query_data

  • metric - (Required) The metric of the query.
  • aggregation_type - (Optional) The type of aggregation. One of Count, Minimum, Maximum, Sum, Average, None.
  • group_by - The field to group the results by.
  • filter - (Block List, Required) A list of filters for the metrics query.
    • key - (Required) The key of the metrics filter.
    • value - (Required) The value of the metrics filter.
    • negation - (Optional) Whether or not the metrics filter is negated.
  • operator - (Block List, Optional) A list of operator data for the metrics query.

Schema for operator

  • operator_name - (Required) The name of the metrics operator.
  • parameter - (Block List, Required) A list of operator parameters for the operator data.
    • key - (Required) The key of the operator parameter.
    • value - (Required) The value of the operator parameter.

Schema for linked_dashboard

  • id - (Required) Identifier of the linked dashboard.
  • relative_path - (Optional) Relative path of the linked dashboard to the dashboard of the linking panel.
  • include_time_range - (Optional) Include time range from the current dashboard to the linked dashboard. Defaults to true.
  • include_variables - (Optional) Include variables from the current dashboard to the linked dashboard. Defaults to true.

Schema for layout

  • grid - (Block List, Max: 1, Optional) Panel layout for the dashboard.

Schema for grid

  • layout_structure - (Block List, Required) Layout structure for the panels in the dashboard.
    • key - (Required) The identifier of the panel that this structure applies to. It’s same as panel.key.
    • structure - (Required) The structure of the panel.

Schema for variable

  • name - (Required) Name of the variable. The variable name is case-insensitive.
  • display_name - (Optional) Display name of the variable shown in the UI. If this field is empty, the name field will be used.
  • default_value - (Optional) Default value of the variable.
  • source_definition - (Required) Source definition for variable values. See source_definition schema for details.
  • allow_multi_select - (Optional) Allow multiple selections in the values dropdown.
  • include_all_option - (Optional) Include an “All” option at the top of the variable’s values dropdown. Defaults to true.
  • hide_from_ui - (Optional) Hide the variable in the dashboard UI.

Schema for source_definition

  • log_query_variable_source_definition - (Optional) Variable values from a log query.
    • query - (Required) A log query.
    • field - (Required) A field in log query to populate the variable values
  • metadata_variable_source_definition - (Optional) Variable values from a metric query.
    • filter - (Required) Filter to search the catalog.
    • key - (Required) Return the values for this given key.
  • csv_variable_source_definition - (Optional) Variable values in csv format.
    • values - (Required) A comma separated values for the variable.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var personalFolder = SumoLogic.GetPersonalFolder.Invoke();

    var api_dashboard = new SumoLogic.Dashboard("api-dashboard", new()
    {
        Title = "Api Health Dashboard",
        Description = "Demo dashboard description",
        FolderId = personalFolder.Apply(getPersonalFolderResult => getPersonalFolderResult.Id),
        RefreshInterval = 120,
        Theme = "Dark",
        TimeRange = new SumoLogic.Inputs.DashboardTimeRangeArgs
        {
            BeginBoundedTimeRange = new SumoLogic.Inputs.DashboardTimeRangeBeginBoundedTimeRangeArgs
            {
                From = new SumoLogic.Inputs.DashboardTimeRangeBeginBoundedTimeRangeFromArgs
                {
                    LiteralTimeRange = new SumoLogic.Inputs.DashboardTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs
                    {
                        RangeName = "today",
                    },
                },
            },
        },
        TopologyLabelMap = new SumoLogic.Inputs.DashboardTopologyLabelMapArgs
        {
            Datas = new[]
            {
                new SumoLogic.Inputs.DashboardTopologyLabelMapDataArgs
                {
                    Label = "cluster",
                    Values = new[]
                    {
                        "api-prod",
                    },
                },
                new SumoLogic.Inputs.DashboardTopologyLabelMapDataArgs
                {
                    Label = "namespace",
                    Values = new[]
                    {
                        "default",
                    },
                },
            },
        },
        Domain = "app",
        Panels = new[]
        {
            new SumoLogic.Inputs.DashboardPanelArgs
            {
                TextPanel = new SumoLogic.Inputs.DashboardPanelTextPanelArgs
                {
                    Key = "text-panel-01",
                    Title = "Api Health",
                    VisualSettings = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["text"] = new Dictionary<string, object?>
                        {
                            ["verticalAlignment"] = "top",
                            ["horizontalAlignment"] = "left",
                            ["fontSize"] = 12,
                        },
                    }),
                    KeepVisualSettingsConsistentWithParent = true,
                    Text = @"## Api Health Monitoring

Use this dashboard to monitor API service health. It contains following panels:

1. API errors: Errors in last 12 hours
3. API 5xx: Count of 5xx response
3. CPU utilization: CPU utilization in last 60 mins
",
                },
            },
            new SumoLogic.Inputs.DashboardPanelArgs
            {
                SumoSearchPanel = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelArgs
                {
                    Key = "search-panel-01",
                    Title = "Api Errors by Host",
                    Description = "Errors in api service since last 12 hours",
                    VisualSettings = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["general"] = new Dictionary<string, object?>
                        {
                            ["mode"] = "timeSeries",
                            ["type"] = "area",
                            ["displayType"] = "stacked",
                            ["markerSize"] = 5,
                            ["lineDashType"] = "solid",
                            ["markerType"] = "square",
                            ["lineThickness"] = 1,
                        },
                        ["title"] = new Dictionary<string, object?>
                        {
                            ["fontSize"] = 14,
                        },
                        ["legend"] = new Dictionary<string, object?>
                        {
                            ["enabled"] = true,
                            ["verticalAlign"] = "bottom",
                            ["fontSize"] = 12,
                            ["maxHeight"] = 50,
                            ["showAsTable"] = false,
                            ["wrap"] = true,
                        },
                    }),
                    KeepVisualSettingsConsistentWithParent = true,
                    Queries = new[]
                    {
                        new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryArgs
                        {
                            QueryString = "_sourceCategory=api error | timeslice 1h | count by _timeslice, _sourceHost | transpose row _timeslice column _sourceHost",
                            QueryType = "Logs",
                            QueryKey = "A",
                        },
                    },
                    TimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeArgs
                    {
                        BeginBoundedTimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs
                        {
                            From = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs
                            {
                                RelativeTimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs
                                {
                                    RelativeTime = "-12h",
                                },
                            },
                        },
                    },
                },
            },
            new SumoLogic.Inputs.DashboardPanelArgs
            {
                SumoSearchPanel = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelArgs
                {
                    Key = "metrics-panel-01",
                    Title = "Api 5xx Response Count",
                    Description = "Count of 5xx response from api service",
                    VisualSettings = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["general"] = new Dictionary<string, object?>
                        {
                            ["mode"] = "distribution",
                            ["type"] = "pie",
                            ["displayType"] = "default",
                            ["fillOpacity"] = 1,
                            ["startAngle"] = 270,
                            ["innerRadius"] = "40%",
                            ["maxNumOfSlices"] = 10,
                            ["aggregationType"] = "sum",
                        },
                        ["title"] = new Dictionary<string, object?>
                        {
                            ["fontSize"] = 14,
                        },
                    }),
                    KeepVisualSettingsConsistentWithParent = true,
                    Queries = new[]
                    {
                        new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryArgs
                        {
                            QueryString = "_sourceCategory=api metric=Api-5xx",
                            QueryType = "Metrics",
                            QueryKey = "A",
                            MetricsQueryMode = "Advanced",
                        },
                    },
                    TimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeArgs
                    {
                        BeginBoundedTimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs
                        {
                            From = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs
                            {
                                LiteralTimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs
                                {
                                    RangeName = "today",
                                },
                            },
                        },
                    },
                },
            },
            new SumoLogic.Inputs.DashboardPanelArgs
            {
                SumoSearchPanel = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelArgs
                {
                    Key = "metrics-panel-02",
                    Title = "CPU Utilization",
                    Description = "CPU utilization in api service",
                    VisualSettings = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["general"] = new Dictionary<string, object?>
                        {
                            ["mode"] = "timeSeries",
                            ["type"] = "line",
                            ["displayType"] = "smooth",
                            ["markerSize"] = 5,
                            ["lineDashType"] = "dashDot",
                            ["markerType"] = "none",
                            ["lineThickness"] = 1,
                        },
                        ["title"] = new Dictionary<string, object?>
                        {
                            ["fontSize"] = 14,
                        },
                    }),
                    KeepVisualSettingsConsistentWithParent = true,
                    Queries = new[]
                    {
                        new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryArgs
                        {
                            QueryString = "metric=Proc_CPU nite-api-1",
                            QueryType = "Metrics",
                            QueryKey = "A",
                            MetricsQueryMode = "Basic",
                            MetricsQueryData = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs
                            {
                                Metric = "Proc_CPU",
                                Filters = new[]
                                {
                                    new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs
                                    {
                                        Key = "_sourcehost",
                                        Negation = false,
                                        Value = "nite-api-1",
                                    },
                                },
                                AggregationType = "None",
                            },
                        },
                        new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryArgs
                        {
                            QueryString = "metric=Proc_CPU nite-api-2",
                            QueryType = "Metrics",
                            QueryKey = "B",
                            MetricsQueryMode = "Basic",
                            MetricsQueryData = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs
                            {
                                Metric = "Proc_CPU",
                                Filters = new[]
                                {
                                    new SumoLogic.Inputs.DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs
                                    {
                                        Key = "_sourcehost",
                                        Negation = false,
                                        Value = "nite-api-2",
                                    },
                                },
                                AggregationType = "None",
                            },
                        },
                    },
                    TimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeArgs
                    {
                        BeginBoundedTimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs
                        {
                            From = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs
                            {
                                RelativeTimeRange = new SumoLogic.Inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs
                                {
                                    RelativeTime = "-1h",
                                },
                            },
                        },
                    },
                },
            },
        },
        Layout = new SumoLogic.Inputs.DashboardLayoutArgs
        {
            Grid = new SumoLogic.Inputs.DashboardLayoutGridArgs
            {
                LayoutStructures = new[]
                {
                    new SumoLogic.Inputs.DashboardLayoutGridLayoutStructureArgs
                    {
                        Key = "text-panel-01",
                        Structure = "{\"height\":5,\"width\":24,\"x\":0,\"y\":0}",
                    },
                    new SumoLogic.Inputs.DashboardLayoutGridLayoutStructureArgs
                    {
                        Key = "search-panel-01",
                        Structure = "{\"height\":10,\"width\":12,\"x\":0,\"y\":5}",
                    },
                    new SumoLogic.Inputs.DashboardLayoutGridLayoutStructureArgs
                    {
                        Key = "metrics-panel-01",
                        Structure = "{\"height\":10,\"width\":12,\"x\":12,\"y\":5}",
                    },
                    new SumoLogic.Inputs.DashboardLayoutGridLayoutStructureArgs
                    {
                        Key = "metrics-panel-02",
                        Structure = "{\"height\":10,\"width\":24,\"x\":0,\"y\":25}",
                    },
                },
            },
        },
        Variables = new[]
        {
            new SumoLogic.Inputs.DashboardVariableArgs
            {
                Name = "_sourceHost",
                DisplayName = "Source Host",
                DefaultValue = "nite-api-1",
                SourceDefinition = new SumoLogic.Inputs.DashboardVariableSourceDefinitionArgs
                {
                    CsvVariableSourceDefinition = new SumoLogic.Inputs.DashboardVariableSourceDefinitionCsvVariableSourceDefinitionArgs
                    {
                        Values = "nite-api-1,nite-api-2",
                    },
                },
                AllowMultiSelect = true,
                IncludeAllOption = true,
                HideFromUi = false,
            },
        },
    });

});
package main

import (
	"encoding/json"
	"fmt"

	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		personalFolder, err := sumologic.GetPersonalFolder(ctx, nil, nil)
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"text": map[string]interface{}{
				"verticalAlignment":   "top",
				"horizontalAlignment": "left",
				"fontSize":            12,
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"general": map[string]interface{}{
				"mode":          "timeSeries",
				"type":          "area",
				"displayType":   "stacked",
				"markerSize":    5,
				"lineDashType":  "solid",
				"markerType":    "square",
				"lineThickness": 1,
			},
			"title": map[string]interface{}{
				"fontSize": 14,
			},
			"legend": map[string]interface{}{
				"enabled":       true,
				"verticalAlign": "bottom",
				"fontSize":      12,
				"maxHeight":     50,
				"showAsTable":   false,
				"wrap":          true,
			},
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		tmpJSON2, err := json.Marshal(map[string]interface{}{
			"general": map[string]interface{}{
				"mode":            "distribution",
				"type":            "pie",
				"displayType":     "default",
				"fillOpacity":     1,
				"startAngle":      270,
				"innerRadius":     fmt.Sprintf("40%v", "%"),
				"maxNumOfSlices":  10,
				"aggregationType": "sum",
			},
			"title": map[string]interface{}{
				"fontSize": 14,
			},
		})
		if err != nil {
			return err
		}
		json2 := string(tmpJSON2)
		tmpJSON3, err := json.Marshal(map[string]interface{}{
			"general": map[string]interface{}{
				"mode":          "timeSeries",
				"type":          "line",
				"displayType":   "smooth",
				"markerSize":    5,
				"lineDashType":  "dashDot",
				"markerType":    "none",
				"lineThickness": 1,
			},
			"title": map[string]interface{}{
				"fontSize": 14,
			},
		})
		if err != nil {
			return err
		}
		json3 := string(tmpJSON3)
		_, err = sumologic.NewDashboard(ctx, "api-dashboard", &sumologic.DashboardArgs{
			Title:           pulumi.String("Api Health Dashboard"),
			Description:     pulumi.String("Demo dashboard description"),
			FolderId:        pulumi.String(personalFolder.Id),
			RefreshInterval: pulumi.Int(120),
			Theme:           pulumi.String("Dark"),
			TimeRange: &DashboardTimeRangeArgs{
				BeginBoundedTimeRange: &DashboardTimeRangeBeginBoundedTimeRangeArgs{
					From: &DashboardTimeRangeBeginBoundedTimeRangeFromArgs{
						LiteralTimeRange: &DashboardTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs{
							RangeName: pulumi.String("today"),
						},
					},
				},
			},
			TopologyLabelMap: &DashboardTopologyLabelMapArgs{
				Datas: DashboardTopologyLabelMapDataArray{
					&DashboardTopologyLabelMapDataArgs{
						Label: pulumi.String("cluster"),
						Values: pulumi.StringArray{
							pulumi.String("api-prod"),
						},
					},
					&DashboardTopologyLabelMapDataArgs{
						Label: pulumi.String("namespace"),
						Values: pulumi.StringArray{
							pulumi.String("default"),
						},
					},
				},
			},
			Domain: pulumi.String("app"),
			Panels: DashboardPanelArray{
				&DashboardPanelArgs{
					TextPanel: &DashboardPanelTextPanelArgs{
						Key:                                    pulumi.String("text-panel-01"),
						Title:                                  pulumi.String("Api Health"),
						VisualSettings:                         pulumi.String(json0),
						KeepVisualSettingsConsistentWithParent: pulumi.Bool(true),
						Text: pulumi.String(fmt.Sprintf(`## Api Health Monitoring

Use this dashboard to monitor API service health. It contains following panels:

1. API errors: Errors in last 12 hours
3. API 5xx: Count of 5xx response
3. CPU utilization: CPU utilization in last 60 mins
`)),
					},
				},
				&DashboardPanelArgs{
					SumoSearchPanel: &DashboardPanelSumoSearchPanelArgs{
						Key:                                    pulumi.String("search-panel-01"),
						Title:                                  pulumi.String("Api Errors by Host"),
						Description:                            pulumi.String("Errors in api service since last 12 hours"),
						VisualSettings:                         pulumi.String(json1),
						KeepVisualSettingsConsistentWithParent: pulumi.Bool(true),
						Queries: DashboardPanelSumoSearchPanelQueryArray{
							&DashboardPanelSumoSearchPanelQueryArgs{
								QueryString: pulumi.String("_sourceCategory=api error | timeslice 1h | count by _timeslice, _sourceHost | transpose row _timeslice column _sourceHost"),
								QueryType:   pulumi.String("Logs"),
								QueryKey:    pulumi.String("A"),
							},
						},
						TimeRange: &DashboardPanelSumoSearchPanelTimeRangeArgs{
							BeginBoundedTimeRange: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs{
								From: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs{
									RelativeTimeRange: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs{
										RelativeTime: pulumi.String("-12h"),
									},
								},
							},
						},
					},
				},
				&DashboardPanelArgs{
					SumoSearchPanel: &DashboardPanelSumoSearchPanelArgs{
						Key:                                    pulumi.String("metrics-panel-01"),
						Title:                                  pulumi.String("Api 5xx Response Count"),
						Description:                            pulumi.String("Count of 5xx response from api service"),
						VisualSettings:                         pulumi.String(json2),
						KeepVisualSettingsConsistentWithParent: pulumi.Bool(true),
						Queries: DashboardPanelSumoSearchPanelQueryArray{
							&DashboardPanelSumoSearchPanelQueryArgs{
								QueryString:      pulumi.String("_sourceCategory=api metric=Api-5xx"),
								QueryType:        pulumi.String("Metrics"),
								QueryKey:         pulumi.String("A"),
								MetricsQueryMode: pulumi.String("Advanced"),
							},
						},
						TimeRange: &DashboardPanelSumoSearchPanelTimeRangeArgs{
							BeginBoundedTimeRange: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs{
								From: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs{
									LiteralTimeRange: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs{
										RangeName: pulumi.String("today"),
									},
								},
							},
						},
					},
				},
				&DashboardPanelArgs{
					SumoSearchPanel: &DashboardPanelSumoSearchPanelArgs{
						Key:                                    pulumi.String("metrics-panel-02"),
						Title:                                  pulumi.String("CPU Utilization"),
						Description:                            pulumi.String("CPU utilization in api service"),
						VisualSettings:                         pulumi.String(json3),
						KeepVisualSettingsConsistentWithParent: pulumi.Bool(true),
						Queries: DashboardPanelSumoSearchPanelQueryArray{
							&DashboardPanelSumoSearchPanelQueryArgs{
								QueryString:      pulumi.String("metric=Proc_CPU nite-api-1"),
								QueryType:        pulumi.String("Metrics"),
								QueryKey:         pulumi.String("A"),
								MetricsQueryMode: pulumi.String("Basic"),
								MetricsQueryData: &DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs{
									Metric: pulumi.String("Proc_CPU"),
									Filters: DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArray{
										&DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs{
											Key:      pulumi.String("_sourcehost"),
											Negation: pulumi.Bool(false),
											Value:    pulumi.String("nite-api-1"),
										},
									},
									AggregationType: pulumi.String("None"),
								},
							},
							&DashboardPanelSumoSearchPanelQueryArgs{
								QueryString:      pulumi.String("metric=Proc_CPU nite-api-2"),
								QueryType:        pulumi.String("Metrics"),
								QueryKey:         pulumi.String("B"),
								MetricsQueryMode: pulumi.String("Basic"),
								MetricsQueryData: &DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs{
									Metric: pulumi.String("Proc_CPU"),
									Filters: DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArray{
										&DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs{
											Key:      pulumi.String("_sourcehost"),
											Negation: pulumi.Bool(false),
											Value:    pulumi.String("nite-api-2"),
										},
									},
									AggregationType: pulumi.String("None"),
								},
							},
						},
						TimeRange: &DashboardPanelSumoSearchPanelTimeRangeArgs{
							BeginBoundedTimeRange: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs{
								From: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs{
									RelativeTimeRange: &DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs{
										RelativeTime: pulumi.String("-1h"),
									},
								},
							},
						},
					},
				},
			},
			Layout: &DashboardLayoutArgs{
				Grid: &DashboardLayoutGridArgs{
					LayoutStructures: DashboardLayoutGridLayoutStructureArray{
						&DashboardLayoutGridLayoutStructureArgs{
							Key:       pulumi.String("text-panel-01"),
							Structure: pulumi.String("{\"height\":5,\"width\":24,\"x\":0,\"y\":0}"),
						},
						&DashboardLayoutGridLayoutStructureArgs{
							Key:       pulumi.String("search-panel-01"),
							Structure: pulumi.String("{\"height\":10,\"width\":12,\"x\":0,\"y\":5}"),
						},
						&DashboardLayoutGridLayoutStructureArgs{
							Key:       pulumi.String("metrics-panel-01"),
							Structure: pulumi.String("{\"height\":10,\"width\":12,\"x\":12,\"y\":5}"),
						},
						&DashboardLayoutGridLayoutStructureArgs{
							Key:       pulumi.String("metrics-panel-02"),
							Structure: pulumi.String("{\"height\":10,\"width\":24,\"x\":0,\"y\":25}"),
						},
					},
				},
			},
			Variables: DashboardVariableArray{
				&DashboardVariableArgs{
					Name:         pulumi.String("_sourceHost"),
					DisplayName:  pulumi.String("Source Host"),
					DefaultValue: pulumi.String("nite-api-1"),
					SourceDefinition: &DashboardVariableSourceDefinitionArgs{
						CsvVariableSourceDefinition: &DashboardVariableSourceDefinitionCsvVariableSourceDefinitionArgs{
							Values: pulumi.String("nite-api-1,nite-api-2"),
						},
					},
					AllowMultiSelect: pulumi.Bool(true),
					IncludeAllOption: pulumi.Bool(true),
					HideFromUi:       pulumi.Bool(false),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.SumologicFunctions;
import com.pulumi.sumologic.inputs.GetPersonalFolderArgs;
import com.pulumi.sumologic.Dashboard;
import com.pulumi.sumologic.DashboardArgs;
import com.pulumi.sumologic.inputs.DashboardTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardTimeRangeBeginBoundedTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardTimeRangeBeginBoundedTimeRangeFromArgs;
import com.pulumi.sumologic.inputs.DashboardTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardTopologyLabelMapArgs;
import com.pulumi.sumologic.inputs.DashboardPanelArgs;
import com.pulumi.sumologic.inputs.DashboardPanelTextPanelArgs;
import com.pulumi.sumologic.inputs.DashboardPanelSumoSearchPanelArgs;
import com.pulumi.sumologic.inputs.DashboardPanelSumoSearchPanelTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs;
import com.pulumi.sumologic.inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs;
import com.pulumi.sumologic.inputs.DashboardLayoutArgs;
import com.pulumi.sumologic.inputs.DashboardLayoutGridArgs;
import com.pulumi.sumologic.inputs.DashboardVariableArgs;
import com.pulumi.sumologic.inputs.DashboardVariableSourceDefinitionArgs;
import com.pulumi.sumologic.inputs.DashboardVariableSourceDefinitionCsvVariableSourceDefinitionArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var personalFolder = SumologicFunctions.getPersonalFolder();

        var api_dashboard = new Dashboard("api-dashboard", DashboardArgs.builder()        
            .title("Api Health Dashboard")
            .description("Demo dashboard description")
            .folderId(personalFolder.applyValue(getPersonalFolderResult -> getPersonalFolderResult.id()))
            .refreshInterval(120)
            .theme("Dark")
            .timeRange(DashboardTimeRangeArgs.builder()
                .beginBoundedTimeRange(DashboardTimeRangeBeginBoundedTimeRangeArgs.builder()
                    .from(DashboardTimeRangeBeginBoundedTimeRangeFromArgs.builder()
                        .literalTimeRange(DashboardTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs.builder()
                            .rangeName("today")
                            .build())
                        .build())
                    .build())
                .build())
            .topologyLabelMap(DashboardTopologyLabelMapArgs.builder()
                .datas(                
                    DashboardTopologyLabelMapDataArgs.builder()
                        .label("cluster")
                        .values("api-prod")
                        .build(),
                    DashboardTopologyLabelMapDataArgs.builder()
                        .label("namespace")
                        .values("default")
                        .build())
                .build())
            .domain("app")
            .panels(            
                DashboardPanelArgs.builder()
                    .textPanel(DashboardPanelTextPanelArgs.builder()
                        .key("text-panel-01")
                        .title("Api Health")
                        .visualSettings(serializeJson(
                            jsonObject(
                                jsonProperty("text", jsonObject(
                                    jsonProperty("verticalAlignment", "top"),
                                    jsonProperty("horizontalAlignment", "left"),
                                    jsonProperty("fontSize", 12)
                                ))
                            )))
                        .keepVisualSettingsConsistentWithParent(true)
                        .text("""
## Api Health Monitoring

Use this dashboard to monitor API service health. It contains following panels:

1. API errors: Errors in last 12 hours
3. API 5xx: Count of 5xx response
3. CPU utilization: CPU utilization in last 60 mins
                        """)
                        .build())
                    .build(),
                DashboardPanelArgs.builder()
                    .sumoSearchPanel(DashboardPanelSumoSearchPanelArgs.builder()
                        .key("search-panel-01")
                        .title("Api Errors by Host")
                        .description("Errors in api service since last 12 hours")
                        .visualSettings(serializeJson(
                            jsonObject(
                                jsonProperty("general", jsonObject(
                                    jsonProperty("mode", "timeSeries"),
                                    jsonProperty("type", "area"),
                                    jsonProperty("displayType", "stacked"),
                                    jsonProperty("markerSize", 5),
                                    jsonProperty("lineDashType", "solid"),
                                    jsonProperty("markerType", "square"),
                                    jsonProperty("lineThickness", 1)
                                )),
                                jsonProperty("title", jsonObject(
                                    jsonProperty("fontSize", 14)
                                )),
                                jsonProperty("legend", jsonObject(
                                    jsonProperty("enabled", true),
                                    jsonProperty("verticalAlign", "bottom"),
                                    jsonProperty("fontSize", 12),
                                    jsonProperty("maxHeight", 50),
                                    jsonProperty("showAsTable", false),
                                    jsonProperty("wrap", true)
                                ))
                            )))
                        .keepVisualSettingsConsistentWithParent(true)
                        .queries(DashboardPanelSumoSearchPanelQueryArgs.builder()
                            .queryString("_sourceCategory=api error | timeslice 1h | count by _timeslice, _sourceHost | transpose row _timeslice column _sourceHost")
                            .queryType("Logs")
                            .queryKey("A")
                            .build())
                        .timeRange(DashboardPanelSumoSearchPanelTimeRangeArgs.builder()
                            .beginBoundedTimeRange(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs.builder()
                                .from(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs.builder()
                                    .relativeTimeRange(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs.builder()
                                        .relativeTime("-12h")
                                        .build())
                                    .build())
                                .build())
                            .build())
                        .build())
                    .build(),
                DashboardPanelArgs.builder()
                    .sumoSearchPanel(DashboardPanelSumoSearchPanelArgs.builder()
                        .key("metrics-panel-01")
                        .title("Api 5xx Response Count")
                        .description("Count of 5xx response from api service")
                        .visualSettings(serializeJson(
                            jsonObject(
                                jsonProperty("general", jsonObject(
                                    jsonProperty("mode", "distribution"),
                                    jsonProperty("type", "pie"),
                                    jsonProperty("displayType", "default"),
                                    jsonProperty("fillOpacity", 1),
                                    jsonProperty("startAngle", 270),
                                    jsonProperty("innerRadius", "40%"),
                                    jsonProperty("maxNumOfSlices", 10),
                                    jsonProperty("aggregationType", "sum")
                                )),
                                jsonProperty("title", jsonObject(
                                    jsonProperty("fontSize", 14)
                                ))
                            )))
                        .keepVisualSettingsConsistentWithParent(true)
                        .queries(DashboardPanelSumoSearchPanelQueryArgs.builder()
                            .queryString("_sourceCategory=api metric=Api-5xx")
                            .queryType("Metrics")
                            .queryKey("A")
                            .metricsQueryMode("Advanced")
                            .build())
                        .timeRange(DashboardPanelSumoSearchPanelTimeRangeArgs.builder()
                            .beginBoundedTimeRange(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs.builder()
                                .from(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs.builder()
                                    .literalTimeRange(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs.builder()
                                        .rangeName("today")
                                        .build())
                                    .build())
                                .build())
                            .build())
                        .build())
                    .build(),
                DashboardPanelArgs.builder()
                    .sumoSearchPanel(DashboardPanelSumoSearchPanelArgs.builder()
                        .key("metrics-panel-02")
                        .title("CPU Utilization")
                        .description("CPU utilization in api service")
                        .visualSettings(serializeJson(
                            jsonObject(
                                jsonProperty("general", jsonObject(
                                    jsonProperty("mode", "timeSeries"),
                                    jsonProperty("type", "line"),
                                    jsonProperty("displayType", "smooth"),
                                    jsonProperty("markerSize", 5),
                                    jsonProperty("lineDashType", "dashDot"),
                                    jsonProperty("markerType", "none"),
                                    jsonProperty("lineThickness", 1)
                                )),
                                jsonProperty("title", jsonObject(
                                    jsonProperty("fontSize", 14)
                                ))
                            )))
                        .keepVisualSettingsConsistentWithParent(true)
                        .queries(                        
                            DashboardPanelSumoSearchPanelQueryArgs.builder()
                                .queryString("metric=Proc_CPU nite-api-1")
                                .queryType("Metrics")
                                .queryKey("A")
                                .metricsQueryMode("Basic")
                                .metricsQueryData(DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs.builder()
                                    .metric("Proc_CPU")
                                    .filters(DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs.builder()
                                        .key("_sourcehost")
                                        .negation(false)
                                        .value("nite-api-1")
                                        .build())
                                    .aggregationType("None")
                                    .build())
                                .build(),
                            DashboardPanelSumoSearchPanelQueryArgs.builder()
                                .queryString("metric=Proc_CPU nite-api-2")
                                .queryType("Metrics")
                                .queryKey("B")
                                .metricsQueryMode("Basic")
                                .metricsQueryData(DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs.builder()
                                    .metric("Proc_CPU")
                                    .filters(DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs.builder()
                                        .key("_sourcehost")
                                        .negation(false)
                                        .value("nite-api-2")
                                        .build())
                                    .aggregationType("None")
                                    .build())
                                .build())
                        .timeRange(DashboardPanelSumoSearchPanelTimeRangeArgs.builder()
                            .beginBoundedTimeRange(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs.builder()
                                .from(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs.builder()
                                    .relativeTimeRange(DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs.builder()
                                        .relativeTime("-1h")
                                        .build())
                                    .build())
                                .build())
                            .build())
                        .build())
                    .build())
            .layout(DashboardLayoutArgs.builder()
                .grid(DashboardLayoutGridArgs.builder()
                    .layoutStructures(                    
                        DashboardLayoutGridLayoutStructureArgs.builder()
                            .key("text-panel-01")
                            .structure("{\"height\":5,\"width\":24,\"x\":0,\"y\":0}")
                            .build(),
                        DashboardLayoutGridLayoutStructureArgs.builder()
                            .key("search-panel-01")
                            .structure("{\"height\":10,\"width\":12,\"x\":0,\"y\":5}")
                            .build(),
                        DashboardLayoutGridLayoutStructureArgs.builder()
                            .key("metrics-panel-01")
                            .structure("{\"height\":10,\"width\":12,\"x\":12,\"y\":5}")
                            .build(),
                        DashboardLayoutGridLayoutStructureArgs.builder()
                            .key("metrics-panel-02")
                            .structure("{\"height\":10,\"width\":24,\"x\":0,\"y\":25}")
                            .build())
                    .build())
                .build())
            .variables(DashboardVariableArgs.builder()
                .name("_sourceHost")
                .displayName("Source Host")
                .defaultValue("nite-api-1")
                .sourceDefinition(DashboardVariableSourceDefinitionArgs.builder()
                    .csvVariableSourceDefinition(DashboardVariableSourceDefinitionCsvVariableSourceDefinitionArgs.builder()
                        .values("nite-api-1,nite-api-2")
                        .build())
                    .build())
                .allowMultiSelect(true)
                .includeAllOption(true)
                .hideFromUi(false)
                .build())
            .build());

    }
}
import pulumi
import json
import pulumi_sumologic as sumologic

personal_folder = sumologic.get_personal_folder()
api_dashboard = sumologic.Dashboard("api-dashboard",
    title="Api Health Dashboard",
    description="Demo dashboard description",
    folder_id=personal_folder.id,
    refresh_interval=120,
    theme="Dark",
    time_range=sumologic.DashboardTimeRangeArgs(
        begin_bounded_time_range=sumologic.DashboardTimeRangeBeginBoundedTimeRangeArgs(
            from_=sumologic.DashboardTimeRangeBeginBoundedTimeRangeFromArgs(
                literal_time_range=sumologic.DashboardTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs(
                    range_name="today",
                ),
            ),
        ),
    ),
    topology_label_map=sumologic.DashboardTopologyLabelMapArgs(
        datas=[
            sumologic.DashboardTopologyLabelMapDataArgs(
                label="cluster",
                values=["api-prod"],
            ),
            sumologic.DashboardTopologyLabelMapDataArgs(
                label="namespace",
                values=["default"],
            ),
        ],
    ),
    domain="app",
    panels=[
        sumologic.DashboardPanelArgs(
            text_panel=sumologic.DashboardPanelTextPanelArgs(
                key="text-panel-01",
                title="Api Health",
                visual_settings=json.dumps({
                    "text": {
                        "verticalAlignment": "top",
                        "horizontalAlignment": "left",
                        "fontSize": 12,
                    },
                }),
                keep_visual_settings_consistent_with_parent=True,
                text="""## Api Health Monitoring

Use this dashboard to monitor API service health. It contains following panels:

1. API errors: Errors in last 12 hours
3. API 5xx: Count of 5xx response
3. CPU utilization: CPU utilization in last 60 mins
""",
            ),
        ),
        sumologic.DashboardPanelArgs(
            sumo_search_panel=sumologic.DashboardPanelSumoSearchPanelArgs(
                key="search-panel-01",
                title="Api Errors by Host",
                description="Errors in api service since last 12 hours",
                visual_settings=json.dumps({
                    "general": {
                        "mode": "timeSeries",
                        "type": "area",
                        "displayType": "stacked",
                        "markerSize": 5,
                        "lineDashType": "solid",
                        "markerType": "square",
                        "lineThickness": 1,
                    },
                    "title": {
                        "fontSize": 14,
                    },
                    "legend": {
                        "enabled": True,
                        "verticalAlign": "bottom",
                        "fontSize": 12,
                        "maxHeight": 50,
                        "showAsTable": False,
                        "wrap": True,
                    },
                }),
                keep_visual_settings_consistent_with_parent=True,
                queries=[sumologic.DashboardPanelSumoSearchPanelQueryArgs(
                    query_string="_sourceCategory=api error | timeslice 1h | count by _timeslice, _sourceHost | transpose row _timeslice column _sourceHost",
                    query_type="Logs",
                    query_key="A",
                )],
                time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeArgs(
                    begin_bounded_time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs(
                        from_=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs(
                            relative_time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs(
                                relative_time="-12h",
                            ),
                        ),
                    ),
                ),
            ),
        ),
        sumologic.DashboardPanelArgs(
            sumo_search_panel=sumologic.DashboardPanelSumoSearchPanelArgs(
                key="metrics-panel-01",
                title="Api 5xx Response Count",
                description="Count of 5xx response from api service",
                visual_settings=json.dumps({
                    "general": {
                        "mode": "distribution",
                        "type": "pie",
                        "displayType": "default",
                        "fillOpacity": 1,
                        "startAngle": 270,
                        "innerRadius": "40%",
                        "maxNumOfSlices": 10,
                        "aggregationType": "sum",
                    },
                    "title": {
                        "fontSize": 14,
                    },
                }),
                keep_visual_settings_consistent_with_parent=True,
                queries=[sumologic.DashboardPanelSumoSearchPanelQueryArgs(
                    query_string="_sourceCategory=api metric=Api-5xx",
                    query_type="Metrics",
                    query_key="A",
                    metrics_query_mode="Advanced",
                )],
                time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeArgs(
                    begin_bounded_time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs(
                        from_=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs(
                            literal_time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromLiteralTimeRangeArgs(
                                range_name="today",
                            ),
                        ),
                    ),
                ),
            ),
        ),
        sumologic.DashboardPanelArgs(
            sumo_search_panel=sumologic.DashboardPanelSumoSearchPanelArgs(
                key="metrics-panel-02",
                title="CPU Utilization",
                description="CPU utilization in api service",
                visual_settings=json.dumps({
                    "general": {
                        "mode": "timeSeries",
                        "type": "line",
                        "displayType": "smooth",
                        "markerSize": 5,
                        "lineDashType": "dashDot",
                        "markerType": "none",
                        "lineThickness": 1,
                    },
                    "title": {
                        "fontSize": 14,
                    },
                }),
                keep_visual_settings_consistent_with_parent=True,
                queries=[
                    sumologic.DashboardPanelSumoSearchPanelQueryArgs(
                        query_string="metric=Proc_CPU nite-api-1",
                        query_type="Metrics",
                        query_key="A",
                        metrics_query_mode="Basic",
                        metrics_query_data=sumologic.DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs(
                            metric="Proc_CPU",
                            filters=[sumologic.DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs(
                                key="_sourcehost",
                                negation=False,
                                value="nite-api-1",
                            )],
                            aggregation_type="None",
                        ),
                    ),
                    sumologic.DashboardPanelSumoSearchPanelQueryArgs(
                        query_string="metric=Proc_CPU nite-api-2",
                        query_type="Metrics",
                        query_key="B",
                        metrics_query_mode="Basic",
                        metrics_query_data=sumologic.DashboardPanelSumoSearchPanelQueryMetricsQueryDataArgs(
                            metric="Proc_CPU",
                            filters=[sumologic.DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilterArgs(
                                key="_sourcehost",
                                negation=False,
                                value="nite-api-2",
                            )],
                            aggregation_type="None",
                        ),
                    ),
                ],
                time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeArgs(
                    begin_bounded_time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeArgs(
                        from_=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromArgs(
                            relative_time_range=sumologic.DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRangeArgs(
                                relative_time="-1h",
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ],
    layout=sumologic.DashboardLayoutArgs(
        grid=sumologic.DashboardLayoutGridArgs(
            layout_structures=[
                sumologic.DashboardLayoutGridLayoutStructureArgs(
                    key="text-panel-01",
                    structure="{\"height\":5,\"width\":24,\"x\":0,\"y\":0}",
                ),
                sumologic.DashboardLayoutGridLayoutStructureArgs(
                    key="search-panel-01",
                    structure="{\"height\":10,\"width\":12,\"x\":0,\"y\":5}",
                ),
                sumologic.DashboardLayoutGridLayoutStructureArgs(
                    key="metrics-panel-01",
                    structure="{\"height\":10,\"width\":12,\"x\":12,\"y\":5}",
                ),
                sumologic.DashboardLayoutGridLayoutStructureArgs(
                    key="metrics-panel-02",
                    structure="{\"height\":10,\"width\":24,\"x\":0,\"y\":25}",
                ),
            ],
        ),
    ),
    variables=[sumologic.DashboardVariableArgs(
        name="_sourceHost",
        display_name="Source Host",
        default_value="nite-api-1",
        source_definition=sumologic.DashboardVariableSourceDefinitionArgs(
            csv_variable_source_definition=sumologic.DashboardVariableSourceDefinitionCsvVariableSourceDefinitionArgs(
                values="nite-api-1,nite-api-2",
            ),
        ),
        allow_multi_select=True,
        include_all_option=True,
        hide_from_ui=False,
    )])
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const personalFolder = sumologic.getPersonalFolder({});
const api_dashboard = new sumologic.Dashboard("api-dashboard", {
    title: "Api Health Dashboard",
    description: "Demo dashboard description",
    folderId: personalFolder.then(personalFolder => personalFolder.id),
    refreshInterval: 120,
    theme: "Dark",
    timeRange: {
        beginBoundedTimeRange: {
            from: {
                literalTimeRange: {
                    rangeName: "today",
                },
            },
        },
    },
    topologyLabelMap: {
        datas: [
            {
                label: "cluster",
                values: ["api-prod"],
            },
            {
                label: "namespace",
                values: ["default"],
            },
        ],
    },
    domain: "app",
    panels: [
        {
            textPanel: {
                key: "text-panel-01",
                title: "Api Health",
                visualSettings: JSON.stringify({
                    text: {
                        verticalAlignment: "top",
                        horizontalAlignment: "left",
                        fontSize: 12,
                    },
                }),
                keepVisualSettingsConsistentWithParent: true,
                text: `## Api Health Monitoring

Use this dashboard to monitor API service health. It contains following panels:

1. API errors: Errors in last 12 hours
3. API 5xx: Count of 5xx response
3. CPU utilization: CPU utilization in last 60 mins
`,
            },
        },
        {
            sumoSearchPanel: {
                key: "search-panel-01",
                title: "Api Errors by Host",
                description: "Errors in api service since last 12 hours",
                visualSettings: JSON.stringify({
                    general: {
                        mode: "timeSeries",
                        type: "area",
                        displayType: "stacked",
                        markerSize: 5,
                        lineDashType: "solid",
                        markerType: "square",
                        lineThickness: 1,
                    },
                    title: {
                        fontSize: 14,
                    },
                    legend: {
                        enabled: true,
                        verticalAlign: "bottom",
                        fontSize: 12,
                        maxHeight: 50,
                        showAsTable: false,
                        wrap: true,
                    },
                }),
                keepVisualSettingsConsistentWithParent: true,
                queries: [{
                    queryString: "_sourceCategory=api error | timeslice 1h | count by _timeslice, _sourceHost | transpose row _timeslice column _sourceHost",
                    queryType: "Logs",
                    queryKey: "A",
                }],
                timeRange: {
                    beginBoundedTimeRange: {
                        from: {
                            relativeTimeRange: {
                                relativeTime: "-12h",
                            },
                        },
                    },
                },
            },
        },
        {
            sumoSearchPanel: {
                key: "metrics-panel-01",
                title: "Api 5xx Response Count",
                description: "Count of 5xx response from api service",
                visualSettings: JSON.stringify({
                    general: {
                        mode: "distribution",
                        type: "pie",
                        displayType: "default",
                        fillOpacity: 1,
                        startAngle: 270,
                        innerRadius: `40%`,
                        maxNumOfSlices: 10,
                        aggregationType: "sum",
                    },
                    title: {
                        fontSize: 14,
                    },
                }),
                keepVisualSettingsConsistentWithParent: true,
                queries: [{
                    queryString: "_sourceCategory=api metric=Api-5xx",
                    queryType: "Metrics",
                    queryKey: "A",
                    metricsQueryMode: "Advanced",
                }],
                timeRange: {
                    beginBoundedTimeRange: {
                        from: {
                            literalTimeRange: {
                                rangeName: "today",
                            },
                        },
                    },
                },
            },
        },
        {
            sumoSearchPanel: {
                key: "metrics-panel-02",
                title: "CPU Utilization",
                description: "CPU utilization in api service",
                visualSettings: JSON.stringify({
                    general: {
                        mode: "timeSeries",
                        type: "line",
                        displayType: "smooth",
                        markerSize: 5,
                        lineDashType: "dashDot",
                        markerType: "none",
                        lineThickness: 1,
                    },
                    title: {
                        fontSize: 14,
                    },
                }),
                keepVisualSettingsConsistentWithParent: true,
                queries: [
                    {
                        queryString: "metric=Proc_CPU nite-api-1",
                        queryType: "Metrics",
                        queryKey: "A",
                        metricsQueryMode: "Basic",
                        metricsQueryData: {
                            metric: "Proc_CPU",
                            filters: [{
                                key: "_sourcehost",
                                negation: false,
                                value: "nite-api-1",
                            }],
                            aggregationType: "None",
                        },
                    },
                    {
                        queryString: "metric=Proc_CPU nite-api-2",
                        queryType: "Metrics",
                        queryKey: "B",
                        metricsQueryMode: "Basic",
                        metricsQueryData: {
                            metric: "Proc_CPU",
                            filters: [{
                                key: "_sourcehost",
                                negation: false,
                                value: "nite-api-2",
                            }],
                            aggregationType: "None",
                        },
                    },
                ],
                timeRange: {
                    beginBoundedTimeRange: {
                        from: {
                            relativeTimeRange: {
                                relativeTime: "-1h",
                            },
                        },
                    },
                },
            },
        },
    ],
    layout: {
        grid: {
            layoutStructures: [
                {
                    key: "text-panel-01",
                    structure: "{\"height\":5,\"width\":24,\"x\":0,\"y\":0}",
                },
                {
                    key: "search-panel-01",
                    structure: "{\"height\":10,\"width\":12,\"x\":0,\"y\":5}",
                },
                {
                    key: "metrics-panel-01",
                    structure: "{\"height\":10,\"width\":12,\"x\":12,\"y\":5}",
                },
                {
                    key: "metrics-panel-02",
                    structure: "{\"height\":10,\"width\":24,\"x\":0,\"y\":25}",
                },
            ],
        },
    },
    variables: [{
        name: "_sourceHost",
        displayName: "Source Host",
        defaultValue: "nite-api-1",
        sourceDefinition: {
            csvVariableSourceDefinition: {
                values: "nite-api-1,nite-api-2",
            },
        },
        allowMultiSelect: true,
        includeAllOption: true,
        hideFromUi: false,
    }],
});
resources:
  api-dashboard:
    type: sumologic:Dashboard
    properties:
      title: Api Health Dashboard
      description: Demo dashboard description
      folderId: ${personalFolder.id}
      refreshInterval: 120
      theme: Dark
      timeRange:
        beginBoundedTimeRange:
          from:
            literalTimeRange:
              rangeName: today
      topologyLabelMap:
        datas:
          - label: cluster
            values:
              - api-prod
          - label: namespace
            values:
              - default
      domain: app
      ## text panel
      panels:
        - textPanel:
            key: text-panel-01
            title: Api Health
            visualSettings:
              Fn::ToJSON:
                text:
                  verticalAlignment: top
                  horizontalAlignment: left
                  fontSize: 12
            keepVisualSettingsConsistentWithParent: true
            text: |
              ## Api Health Monitoring

              Use this dashboard to monitor API service health. It contains following panels:

              1. API errors: Errors in last 12 hours
              3. API 5xx: Count of 5xx response
              3. CPU utilization: CPU utilization in last 60 mins              
        - sumoSearchPanel:
            key: search-panel-01
            title: Api Errors by Host
            description: Errors in api service since last 12 hours
            visualSettings:
              Fn::ToJSON:
                general:
                  mode: timeSeries
                  type: area
                  displayType: stacked
                  markerSize: 5
                  lineDashType: solid
                  markerType: square
                  lineThickness: 1
                title:
                  fontSize: 14
                legend:
                  enabled: true
                  verticalAlign: bottom
                  fontSize: 12
                  maxHeight: 50
                  showAsTable: false
                  wrap: true
            keepVisualSettingsConsistentWithParent: true
            queries:
              - queryString: _sourceCategory=api error | timeslice 1h | count by _timeslice, _sourceHost | transpose row _timeslice column _sourceHost
                queryType: Logs
                queryKey: A
            timeRange:
              beginBoundedTimeRange:
                from:
                  relativeTimeRange:
                    relativeTime: -12h
        - sumoSearchPanel:
            key: metrics-panel-01
            title: Api 5xx Response Count
            description: Count of 5xx response from api service
            visualSettings:
              Fn::ToJSON:
                general:
                  mode: distribution
                  type: pie
                  displayType: default
                  fillOpacity: 1
                  startAngle: 270
                  innerRadius: 40%
                  maxNumOfSlices: 10
                  aggregationType: sum
                title:
                  fontSize: 14
            keepVisualSettingsConsistentWithParent: true
            queries:
              - queryString: _sourceCategory=api metric=Api-5xx
                queryType: Metrics
                queryKey: A
                metricsQueryMode: Advanced
            timeRange:
              beginBoundedTimeRange:
                from:
                  literalTimeRange:
                    rangeName: today
        - sumoSearchPanel:
            key: metrics-panel-02
            title: CPU Utilization
            description: CPU utilization in api service
            visualSettings:
              Fn::ToJSON:
                general:
                  mode: timeSeries
                  type: line
                  displayType: smooth
                  markerSize: 5
                  lineDashType: dashDot
                  markerType: none
                  lineThickness: 1
                title:
                  fontSize: 14
            keepVisualSettingsConsistentWithParent: true
            queries:
              - queryString: metric=Proc_CPU nite-api-1
                queryType: Metrics
                queryKey: A
                metricsQueryMode: Basic
                metricsQueryData:
                  metric: Proc_CPU
                  filters:
                    - key: _sourcehost
                      negation: false
                      value: nite-api-1
                  aggregationType: None
              - queryString: metric=Proc_CPU nite-api-2
                queryType: Metrics
                queryKey: B
                metricsQueryMode: Basic
                metricsQueryData:
                  metric: Proc_CPU
                  filters:
                    - key: _sourcehost
                      negation: false
                      value: nite-api-2
                  aggregationType: None
            timeRange:
              beginBoundedTimeRange:
                from:
                  relativeTimeRange:
                    relativeTime: -1h
      layout:
        grid:
          layoutStructures:
            - key: text-panel-01
              structure: '{"height":5,"width":24,"x":0,"y":0}'
            - key: search-panel-01
              structure: '{"height":10,"width":12,"x":0,"y":5}'
            - key: metrics-panel-01
              structure: '{"height":10,"width":12,"x":12,"y":5}'
            - key: metrics-panel-02
              structure: '{"height":10,"width":24,"x":0,"y":25}'
      ## variables
      variables:
        - name: _sourceHost
          displayName: Source Host
          defaultValue: nite-api-1
          sourceDefinition:
            csvVariableSourceDefinition:
              values: nite-api-1,nite-api-2
          allowMultiSelect: true
          includeAllOption: true
          hideFromUi: false
variables:
  personalFolder:
    Fn::Invoke:
      Function: sumologic:getPersonalFolder
      Arguments: {}

Create Dashboard Resource

new Dashboard(name: string, args: DashboardArgs, opts?: CustomResourceOptions);
@overload
def Dashboard(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              coloring_rules: Optional[Sequence[DashboardColoringRuleArgs]] = None,
              description: Optional[str] = None,
              domain: Optional[str] = None,
              folder_id: Optional[str] = None,
              layout: Optional[DashboardLayoutArgs] = None,
              panels: Optional[Sequence[DashboardPanelArgs]] = None,
              refresh_interval: Optional[int] = None,
              theme: Optional[str] = None,
              time_range: Optional[DashboardTimeRangeArgs] = None,
              title: Optional[str] = None,
              topology_label_map: Optional[DashboardTopologyLabelMapArgs] = None,
              variables: Optional[Sequence[DashboardVariableArgs]] = None)
@overload
def Dashboard(resource_name: str,
              args: DashboardArgs,
              opts: Optional[ResourceOptions] = None)
func NewDashboard(ctx *Context, name string, args DashboardArgs, opts ...ResourceOption) (*Dashboard, error)
public Dashboard(string name, DashboardArgs args, CustomResourceOptions? opts = null)
public Dashboard(String name, DashboardArgs args)
public Dashboard(String name, DashboardArgs args, CustomResourceOptions options)
type: sumologic:Dashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Dashboard Resource Properties

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

Inputs

The Dashboard resource accepts the following input properties:

TimeRange Pulumi.SumoLogic.Inputs.DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

Title string

Title of the dashboard.

ColoringRules List<Pulumi.SumoLogic.Inputs.DashboardColoringRuleArgs>
Description string

Description of the dashboard.

Domain string

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

FolderId string

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

Layout Pulumi.SumoLogic.Inputs.DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

Panels List<Pulumi.SumoLogic.Inputs.DashboardPanelArgs>

A list of panels in the dashboard. See panel schema for details.

RefreshInterval int

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

Theme string

Theme of the dashboard.

TopologyLabelMap Pulumi.SumoLogic.Inputs.DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

Variables List<Pulumi.SumoLogic.Inputs.DashboardVariableArgs>

A list of variables for the dashboard. See variable schema for details.

TimeRange DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

Title string

Title of the dashboard.

ColoringRules []DashboardColoringRuleArgs
Description string

Description of the dashboard.

Domain string

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

FolderId string

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

Layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

Panels []DashboardPanelArgs

A list of panels in the dashboard. See panel schema for details.

RefreshInterval int

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

Theme string

Theme of the dashboard.

TopologyLabelMap DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

Variables []DashboardVariableArgs

A list of variables for the dashboard. See variable schema for details.

timeRange DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

title String

Title of the dashboard.

coloringRules List<DashboardColoringRuleArgs>
description String

Description of the dashboard.

domain String

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folderId String

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

panels List<DashboardPanelArgs>

A list of panels in the dashboard. See panel schema for details.

refreshInterval Integer

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme String

Theme of the dashboard.

topologyLabelMap DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

variables List<DashboardVariableArgs>

A list of variables for the dashboard. See variable schema for details.

timeRange DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

title string

Title of the dashboard.

coloringRules DashboardColoringRuleArgs[]
description string

Description of the dashboard.

domain string

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folderId string

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

panels DashboardPanelArgs[]

A list of panels in the dashboard. See panel schema for details.

refreshInterval number

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme string

Theme of the dashboard.

topologyLabelMap DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

variables DashboardVariableArgs[]

A list of variables for the dashboard. See variable schema for details.

time_range DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

title str

Title of the dashboard.

coloring_rules Sequence[DashboardColoringRuleArgs]
description str

Description of the dashboard.

domain str

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folder_id str

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

panels Sequence[DashboardPanelArgs]

A list of panels in the dashboard. See panel schema for details.

refresh_interval int

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme str

Theme of the dashboard.

topology_label_map DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

variables Sequence[DashboardVariableArgs]

A list of variables for the dashboard. See variable schema for details.

timeRange Property Map

Time range of the dashboard. See time range schema for details.

title String

Title of the dashboard.

coloringRules List<Property Map>
description String

Description of the dashboard.

domain String

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folderId String

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout Property Map

Layout of the dashboard. See layout schema for details.

panels List<Property Map>

A list of panels in the dashboard. See panel schema for details.

refreshInterval Number

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme String

Theme of the dashboard.

topologyLabelMap Property Map

Topology labels for the dashboard. See topology label map schema for details.

variables List<Property Map>

A list of variables for the dashboard. See variable schema for details.

Outputs

All input properties are implicitly available as output properties. Additionally, the Dashboard 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 string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Dashboard Resource

Get an existing Dashboard 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?: DashboardState, opts?: CustomResourceOptions): Dashboard
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        coloring_rules: Optional[Sequence[DashboardColoringRuleArgs]] = None,
        description: Optional[str] = None,
        domain: Optional[str] = None,
        folder_id: Optional[str] = None,
        layout: Optional[DashboardLayoutArgs] = None,
        panels: Optional[Sequence[DashboardPanelArgs]] = None,
        refresh_interval: Optional[int] = None,
        theme: Optional[str] = None,
        time_range: Optional[DashboardTimeRangeArgs] = None,
        title: Optional[str] = None,
        topology_label_map: Optional[DashboardTopologyLabelMapArgs] = None,
        variables: Optional[Sequence[DashboardVariableArgs]] = None) -> Dashboard
func GetDashboard(ctx *Context, name string, id IDInput, state *DashboardState, opts ...ResourceOption) (*Dashboard, error)
public static Dashboard Get(string name, Input<string> id, DashboardState? state, CustomResourceOptions? opts = null)
public static Dashboard get(String name, Output<String> id, DashboardState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
ColoringRules List<Pulumi.SumoLogic.Inputs.DashboardColoringRuleArgs>
Description string

Description of the dashboard.

Domain string

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

FolderId string

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

Layout Pulumi.SumoLogic.Inputs.DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

Panels List<Pulumi.SumoLogic.Inputs.DashboardPanelArgs>

A list of panels in the dashboard. See panel schema for details.

RefreshInterval int

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

Theme string

Theme of the dashboard.

TimeRange Pulumi.SumoLogic.Inputs.DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

Title string

Title of the dashboard.

TopologyLabelMap Pulumi.SumoLogic.Inputs.DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

Variables List<Pulumi.SumoLogic.Inputs.DashboardVariableArgs>

A list of variables for the dashboard. See variable schema for details.

ColoringRules []DashboardColoringRuleArgs
Description string

Description of the dashboard.

Domain string

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

FolderId string

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

Layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

Panels []DashboardPanelArgs

A list of panels in the dashboard. See panel schema for details.

RefreshInterval int

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

Theme string

Theme of the dashboard.

TimeRange DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

Title string

Title of the dashboard.

TopologyLabelMap DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

Variables []DashboardVariableArgs

A list of variables for the dashboard. See variable schema for details.

coloringRules List<DashboardColoringRuleArgs>
description String

Description of the dashboard.

domain String

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folderId String

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

panels List<DashboardPanelArgs>

A list of panels in the dashboard. See panel schema for details.

refreshInterval Integer

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme String

Theme of the dashboard.

timeRange DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

title String

Title of the dashboard.

topologyLabelMap DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

variables List<DashboardVariableArgs>

A list of variables for the dashboard. See variable schema for details.

coloringRules DashboardColoringRuleArgs[]
description string

Description of the dashboard.

domain string

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folderId string

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

panels DashboardPanelArgs[]

A list of panels in the dashboard. See panel schema for details.

refreshInterval number

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme string

Theme of the dashboard.

timeRange DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

title string

Title of the dashboard.

topologyLabelMap DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

variables DashboardVariableArgs[]

A list of variables for the dashboard. See variable schema for details.

coloring_rules Sequence[DashboardColoringRuleArgs]
description str

Description of the dashboard.

domain str

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folder_id str

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout DashboardLayoutArgs

Layout of the dashboard. See layout schema for details.

panels Sequence[DashboardPanelArgs]

A list of panels in the dashboard. See panel schema for details.

refresh_interval int

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme str

Theme of the dashboard.

time_range DashboardTimeRangeArgs

Time range of the dashboard. See time range schema for details.

title str

Title of the dashboard.

topology_label_map DashboardTopologyLabelMapArgs

Topology labels for the dashboard. See topology label map schema for details.

variables Sequence[DashboardVariableArgs]

A list of variables for the dashboard. See variable schema for details.

coloringRules List<Property Map>
description String

Description of the dashboard.

domain String

Domain of the dashboard. If set denotes that the dashboard concerns a given domain.

folderId String

The identifier of the folder to save the dashboard in. By default it is saved in your personal folder.

layout Property Map

Layout of the dashboard. See layout schema for details.

panels List<Property Map>

A list of panels in the dashboard. See panel schema for details.

refreshInterval Number

Interval of time (in seconds) to automatically refresh the dashboard. Valid values are 120,300,900,1800,3600,7200,86400.

theme String

Theme of the dashboard.

timeRange Property Map

Time range of the dashboard. See time range schema for details.

title String

Title of the dashboard.

topologyLabelMap Property Map

Topology labels for the dashboard. See topology label map schema for details.

variables List<Property Map>

A list of variables for the dashboard. See variable schema for details.

Supporting Types

DashboardColoringRule

DashboardColoringRuleColorThreshold

Color string
Max double
Min double
Color string
Max float64
Min float64
color String
max Double
min Double
color string
max number
min number
color str
max float
min float
color String
max Number
min Number

DashboardLayout

DashboardLayoutGrid

DashboardLayoutGridLayoutStructure

Key string
Structure string
Key string
Structure string
key String
structure String
key string
structure string
key str
structure str
key String
structure String

DashboardPanel

DashboardPanelSumoSearchPanel

key String
coloringRule Property Map
description String

Description of the dashboard.

id String
keepVisualSettingsConsistentWithParent Boolean
linkedDashboard Property Map
queries List<Property Map>
timeRange Property Map

Time range of the dashboard. See time range schema for details.

title String

Title of the dashboard.

visualSettings String

DashboardPanelSumoSearchPanelColoringRule

DashboardPanelSumoSearchPanelColoringRuleColorThreshold

Color string
Max double
Min double
Color string
Max float64
Min float64
color String
max Double
min Double
color string
max number
min number
color str
max float
min float
color String
max Number
min Number

DashboardPanelSumoSearchPanelLinkedDashboard

DashboardPanelSumoSearchPanelQuery

DashboardPanelSumoSearchPanelQueryMetricsQueryData

DashboardPanelSumoSearchPanelQueryMetricsQueryDataFilter

Key string
Value string
Negation bool
Key string
Value string
Negation bool
key String
value String
negation Boolean
key string
value string
negation boolean
key str
value str
negation bool
key String
value String
negation Boolean

DashboardPanelSumoSearchPanelQueryMetricsQueryDataOperator

DashboardPanelSumoSearchPanelQueryMetricsQueryDataOperatorParameter

Key string
Value string
Key string
Value string
key String
value String
key string
value string
key str
value str
key String
value String

DashboardPanelSumoSearchPanelTimeRange

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRange

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFrom

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromEpochTimeRange

epochMillis Integer

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromIso8601TimeRange

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromLiteralTimeRange

RangeName string
RangeName string
rangeName String
rangeName string
rangeName String

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeFromRelativeTimeRange

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeTo

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeToEpochTimeRange

epochMillis Integer

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeToIso8601TimeRange

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeToLiteralTimeRange

RangeName string
RangeName string
rangeName String
rangeName string
rangeName String

DashboardPanelSumoSearchPanelTimeRangeBeginBoundedTimeRangeToRelativeTimeRange

DashboardPanelSumoSearchPanelTimeRangeCompleteLiteralTimeRange

RangeName string
RangeName string
rangeName String
rangeName string
rangeName String

DashboardPanelTextPanel

Key string
Id string
KeepVisualSettingsConsistentWithParent bool
Text string
Title string

Title of the dashboard.

VisualSettings string
Key string
Id string
KeepVisualSettingsConsistentWithParent bool
Text string
Title string

Title of the dashboard.

VisualSettings string
key String
id String
keepVisualSettingsConsistentWithParent Boolean
text String
title String

Title of the dashboard.

visualSettings String
key string
id string
keepVisualSettingsConsistentWithParent boolean
text string
title string

Title of the dashboard.

visualSettings string
key str
id str
keep_visual_settings_consistent_with_parent bool
text str
title str

Title of the dashboard.

visual_settings str
key String
id String
keepVisualSettingsConsistentWithParent Boolean
text String
title String

Title of the dashboard.

visualSettings String

DashboardTimeRange

DashboardTimeRangeBeginBoundedTimeRange

DashboardTimeRangeBeginBoundedTimeRangeFrom

DashboardTimeRangeBeginBoundedTimeRangeFromEpochTimeRange

epochMillis Integer

DashboardTimeRangeBeginBoundedTimeRangeFromIso8601TimeRange

DashboardTimeRangeBeginBoundedTimeRangeFromLiteralTimeRange

RangeName string
RangeName string
rangeName String
rangeName string
rangeName String

DashboardTimeRangeBeginBoundedTimeRangeFromRelativeTimeRange

DashboardTimeRangeBeginBoundedTimeRangeTo

DashboardTimeRangeBeginBoundedTimeRangeToEpochTimeRange

epochMillis Integer

DashboardTimeRangeBeginBoundedTimeRangeToIso8601TimeRange

DashboardTimeRangeBeginBoundedTimeRangeToLiteralTimeRange

RangeName string
RangeName string
rangeName String
rangeName string
rangeName String

DashboardTimeRangeBeginBoundedTimeRangeToRelativeTimeRange

DashboardTimeRangeCompleteLiteralTimeRange

RangeName string
RangeName string
rangeName String
rangeName string
rangeName String

DashboardTopologyLabelMap

DashboardTopologyLabelMapData

Label string
Values List<string>
Label string
Values []string
label String
values List<String>
label string
values string[]
label str
values Sequence[str]
label String
values List<String>

DashboardVariable

DashboardVariableSourceDefinition

DashboardVariableSourceDefinitionCsvVariableSourceDefinition

Values string
Values string
values String
values string
values str
values String

DashboardVariableSourceDefinitionLogQueryVariableSourceDefinition

Field string
Query string
Field string
Query string
field String
query String
field string
query string
field str
query str
field String
query String

DashboardVariableSourceDefinitionMetadataVariableSourceDefinition

Filter string
Key string
Filter string
Key string
filter String
key String
filter string
key string
filter str
key str
filter String
key String

Import

Dashboard can be imported using the dashboard id, e.g.hcl

 $ pulumi import sumologic:index/dashboard:Dashboard example-dashboard q0IKwAK5t2qRI4sgiANwnS87k5S4twN2sCpTuZFSsz6ZmbENPsG7PnpqZygc

[1]https://help.sumologic.com/Visualizations-and-Alerts/Dashboard_(New)

Package Details

Repository
https://github.com/pulumi/pulumi-sumologic
License
Apache-2.0
Notes

This Pulumi package is based on the sumologic Terraform Provider.