Sha256: 7de92d42bff5166560fa51c473377203eb741dffa03114795016a11efca2bbd5

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::MetricsAPI.new
from = 789 # Integer | Seconds since the Unix epoch.
opts = {
  host: "host_example", # String | Hostname for filtering the list of metrics returned. If set, metrics retrieved are those with the corresponding hostname tag.
  tag_filter: "env IN (staging,test) AND service:web", # String | Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Cannot be combined with other filters.
}

begin
  # Get active metrics list
  result = api_instance.list_active_metrics(from, opts)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling MetricsAPI->list_active_metrics: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-1.7.0 examples/generated/v1/metrics/ListActiveMetrics.rb