Sha256: 6df5172b2fc390cf22843ff45c86ff9a1d4aeba620446d0e69eaddd9cd701906
Contents?: true
Size: 1.57 KB
Versions: 18
Compression:
Stored size: 1.57 KB
Contents
# Create a new dashboard with sunburst widget and metrics data require "datadog_api_client" api_instance = DatadogAPIClient::V1::DashboardsAPI.new body = DatadogAPIClient::V1::Dashboard.new({ title: "Example-Create_a_new_dashboard_with_sunburst_widget_and_metrics_data", widgets: [ DatadogAPIClient::V1::Widget.new({ definition: DatadogAPIClient::V1::SunburstWidgetDefinition.new({ title: "", title_size: "16", title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, type: DatadogAPIClient::V1::SunburstWidgetDefinitionType::SUNBURST, requests: [ DatadogAPIClient::V1::SunburstWidgetRequest.new({ response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::SCALAR, formulas: [ DatadogAPIClient::V1::WidgetFormula.new({ formula: "query1", }), ], queries: [ DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({ query: "sum:system.mem.used{*} by {service}", data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS, name: "query1", aggregator: DatadogAPIClient::V1::FormulaAndFunctionMetricAggregation::SUM, }), ], }), ], }), layout: DatadogAPIClient::V1::WidgetLayout.new({ x: 0, y: 0, width: 4, height: 4, }), }), ], layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED, }) p api_instance.create_dashboard(body)
Version data entries
18 entries across 18 versions & 1 rubygems