Sha256: e5fbc775adf289e799b088af89c799c94de0623e7c1360e04f76648378663932

Contents?: true

Size: 811 Bytes

Versions: 18

Compression:

Stored size: 811 Bytes

Contents

# Create a ci-pipelines monitor returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::MonitorsAPI.new

body = DatadogAPIClient::V1::Monitor.new({
  name: "Example-Create_a_ci_pipelines_monitor_returns_OK_response",
  type: DatadogAPIClient::V1::MonitorType::CI_PIPELINES_ALERT,
  query: 'ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1',
  message: "some message Notify: @hipchat-channel",
  tags: [
    "test:examplecreateacipipelinesmonitorreturnsokresponse",
    "env:ci",
  ],
  priority: 3,
  options: DatadogAPIClient::V1::MonitorOptions.new({
    thresholds: DatadogAPIClient::V1::MonitorThresholds.new({
      critical: 1,
    }),
  }),
})
p api_instance.create_monitor(body)

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.8.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.7.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.6.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.5.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.4.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.3.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.2.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.1.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.0.2 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.0.1 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-2.0.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-1.11.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-1.10.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-1.9.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-1.8.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-1.7.0 examples/v1/monitors/CreateMonitor_3790803616.rb
datadog_api_client-1.6.0 examples/v1/monitors/CreateMonitor_3790803616.rb