Skip to content

datadog get-custom-metrics

Get all custom metrics by hourly average.can change resolution

Description

Get all custom metrics by hourly average.can change resolution

Synopsis

datadog get-custom-metrics
    [--site <site>]
    [--month <month>]
    [--day <day>]
    [--names <names>]
    [--limit <limit>]
    [--next <next>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

month - (time)

     usage beginning at this hour. (Either month or day should be specified, but not both)
     Example: --month "2019-10-12T07:20:50.52Z"
     Default: 5 hour ago      Attributes: optional

day - (time)

     usage beginning at this hour. (Either month or day should be specified, but not both)
     Example: --day "2019-10-12T07:20:50.52Z"
     Default: 5 hour ago      Attributes: optional

names - (string)

     metric names
     Example: --names "names-1"
     Default: _None_      Attributes: optional, multiple allowed

limit - (int)

     Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified
     Example: --limit 1
     Default: _None_      Attributes: optional

next - (string)

     List following results with a next_record_id provided in the previous query
     Example: --next "next-1"
     Default: _None_      Attributes: optional

Examples

Input:

!datadog get-custom-metrics
Output:
NAME        CATEGORY        AVERAGE         MAXIMUM-USAGE
testMetric  standard        10              25

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "datadog"
Service Instance
Namespace
Object Type "metrics"
Object ID

Please see Access Control for details.