Sha256: 626ccc03b9d555327ab4458a2c1f98a7bf1d4e4b8a77de6c3e46b1da6e848e74
Contents?: true
Size: 1.86 KB
Versions: 19
Compression:
Stored size: 1.86 KB
Contents
# Create a RUM formula and functions monitor returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V1::MonitorsAPI.new body = DatadogAPIClient::V1::Monitor.new({ name: "Example-Monitor", type: DatadogAPIClient::V1::MonitorType::RUM_ALERT, query: 'formula("query2 / query1 * 100").last("15m") >= 0.8', message: "some message Notify: @hipchat-channel", tags: [ "test:examplemonitor", "env:ci", ], priority: 3, options: DatadogAPIClient::V1::MonitorOptions.new({ thresholds: DatadogAPIClient::V1::MonitorThresholds.new({ critical: 0.8, }), variables: [ DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinition.new({ data_source: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventsDataSource::RUM, name: "query2", search: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionSearch.new({ query: "", }), indexes: [ "*", ], compute: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionCompute.new({ aggregation: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventAggregation::COUNT, }), group_by: [], }), DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinition.new({ data_source: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventsDataSource::RUM, name: "query1", search: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionSearch.new({ query: "status:error", }), indexes: [ "*", ], compute: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionCompute.new({ aggregation: DatadogAPIClient::V1::MonitorFormulaAndFunctionEventAggregation::COUNT, }), group_by: [], }), ], }), }) p api_instance.create_monitor(body)
Version data entries
19 entries across 19 versions & 1 rubygems