class Dogapi::V1::UsageService
Constants
- API_VERSION
Public Instance Methods
Retrieve hourly custom metrics usage information
:start_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, for usage beginning at this hour :end_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, default start_hr+1d, for usage ending BEFORE this hour
# File lib/dogapi/v1/usage.rb 44 def get_custom_metrics_usage(start_hr, end_hr = nil) 45 params = { 46 start_hr: start_hr 47 } 48 49 params['end_hr'] = end_hr if end_hr 50 51 request(Net::HTTP::Get, "/api/#{API_VERSION}/usage/timeseries", params, nil, false) 52 end
Retrieve hourly fargate usage information
:start_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, for usage beginning at this hour :end_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, default start_hr+1d, for usage ending BEFORE this hour
# File lib/dogapi/v1/usage.rb 86 def get_fargate_usage(start_hr, end_hr = nil) 87 params = { 88 start_hr: start_hr 89 } 90 91 params['end_hr'] = end_hr if end_hr 92 93 request(Net::HTTP::Get, "/api/#{API_VERSION}/usage/fargate", params, nil, false) 94 end
Retrieve hourly host usage information
:start_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, for usage beginning at this hour :end_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, default start_hr+1d, for usage ending BEFORE this hour
# File lib/dogapi/v1/usage.rb 16 def get_hosts_usage(start_hr, end_hr = nil) 17 params = { 18 start_hr: start_hr 19 } 20 21 params['end_hr'] = end_hr if end_hr 22 23 request(Net::HTTP::Get, "/api/#{API_VERSION}/usage/hosts", params, nil, false) 24 end
Retrieve hourly logs usage information
:start_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, for usage beginning at this hour :end_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, default start_hr+1d, for usage ending BEFORE this hour
# File lib/dogapi/v1/usage.rb 30 def get_logs_usage(start_hr, end_hr = nil) 31 params = { 32 start_hr: start_hr 33 } 34 35 params['end_hr'] = end_hr if end_hr 36 37 request(Net::HTTP::Get, "/api/#{API_VERSION}/usage/logs", params, nil, false) 38 end
Retrieve hourly synthetics usage information
:start_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, for usage beginning at this hour :end_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, default start_hr+1d, for usage ending BEFORE this hour
# File lib/dogapi/v1/usage.rb 72 def get_synthetics_usage(start_hr, end_hr = nil) 73 params = { 74 start_hr: start_hr 75 } 76 77 params['end_hr'] = end_hr if end_hr 78 79 request(Net::HTTP::Get, "/api/#{API_VERSION}/usage/synthetics", params, nil, false) 80 end
Retrieve hourly trace search usage information
:start_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, for usage beginning at this hour :end_hr => String: Datetime ISO-8601 UTC YYYY-MM-DDThh, default start_hr+1d, for usage ending BEFORE this hour
# File lib/dogapi/v1/usage.rb 58 def get_traces_usage(start_hr, end_hr = nil) 59 params = { 60 start_hr: start_hr 61 } 62 63 params['end_hr'] = end_hr if end_hr 64 65 request(Net::HTTP::Get, "/api/#{API_VERSION}/usage/traces", params, nil, false) 66 end