Sha256: 6cc602eafcd6cacad32a10f45422ebd36683adbd3248aeabf7b6840b43cb82a3
Contents?: true
Size: 1.16 KB
Versions: 18
Compression:
Stored size: 1.16 KB
Contents
# Query timeseries data across multiple products returns "OK" response require "datadog_api_client" DatadogAPIClient.configure do |config| config.unstable_operations["v2.query_timeseries_data".to_sym] = true end api_instance = DatadogAPIClient::V2::MetricsAPI.new body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ formulas: [ DatadogAPIClient::V2::QueryFormula.new({ formula: "a+b", limit: DatadogAPIClient::V2::FormulaLimit.new({ count: 10, order: DatadogAPIClient::V2::QuerySortOrder::DESC, }), }), ], from: 1568899800000, interval: 5000, queries: [ DatadogAPIClient::V2::MetricsTimeseriesQuery.new({ data_source: DatadogAPIClient::V2::MetricsDataSource::METRICS, query: "avg:system.cpu.user{*} by {env}", }), ], to: 1568923200000, }), type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, }), }) p api_instance.query_timeseries_data(body)
Version data entries
18 entries across 18 versions & 1 rubygems