Sha256: 09588bacfcbb812816d9be5d7ef7d73ae80994848702f9d1b5a0f549eebf34a6
Contents?: true
Size: 1.98 KB
Versions: 17
Compression:
Stored size: 1.98 KB
Contents
# Create a new dashboard with a timeseries widget and an overlay request require "datadog_api_client" api_instance = DatadogAPIClient::V1::DashboardsAPI.new body = DatadogAPIClient::V1::Dashboard.new({ layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED, title: "Example-Dashboard", widgets: [ DatadogAPIClient::V1::Widget.new({ definition: DatadogAPIClient::V1::TimeseriesWidgetDefinition.new({ type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES, requests: [ DatadogAPIClient::V1::TimeseriesWidgetRequest.new({ on_right_yaxis: false, queries: [ DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({ data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS, name: "mymetric", query: "avg:system.cpu.user{*}", }), ], response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES, display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE, }), DatadogAPIClient::V1::TimeseriesWidgetRequest.new({ response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES, queries: [ DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({ data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS, name: "mymetricoverlay", query: "avg:system.cpu.user{*}", }), ], style: DatadogAPIClient::V1::WidgetRequestStyle.new({ palette: "purple", line_type: DatadogAPIClient::V1::WidgetLineType::SOLID, line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL, }), display_type: DatadogAPIClient::V1::WidgetDisplayType::OVERLAY, }), ], }), }), ], }) p api_instance.create_dashboard(body)
Version data entries
17 entries across 17 versions & 1 rubygems