datadog update-metric
Edit metadata of a specific metric
Description
Edit metadata of a specific metric
Synopsis
datadog update-metric
[--site <site>]
<metric_name>
[--description <description>]
[--short_name <short_name>]
[--statsd_interval <statsd_interval>]
[--type <type>]
[--unit <unit>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
metric_name
- (string)
Name of the metric
Example: "metric_name-1"
Default: _None_
Attributes: required
description
- (string)
Metric description
Example: --description "description-1"
Default: _None_
Attributes: optional
short_name
- (string)
A more human-readable and abbreviated version of the metric name
Example: --short_name "short_name-1"
Default: _None_
Attributes: optional
statsd_interval
- (duration)
StatsD flush interval of the metric in seconds if applicable
Example: --statsd_interval "5 seconds"
Default: _None_
Attributes: optional
type
- (string)
Metric type such as gauge or rate
Example: --type "type-1"
Default: _None_
Attributes: optional
unit
- (string)
Primary unit of the metric such as byte or operation
Example: --unit "unit-1"
Default: _None_
Attributes: optional
Examples
Input:
x=!datadog update-metric --metric_name "datadog.agent.python.version" --description "hello Datadog" --short_name "nameHere" --type "gauge" --unit "byte" --statsd_interval 600
{
"description": "hello Datadog",
"short_name": "nameHere",
"type": "gauge",
"unit": "byte",
"per_unit": null,
"statsd_interval": 600,
"integration": null
}
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "update" |
Service Type | "datadog" |
Service Instance | |
Namespace | |
Object Type | "metric" |
Object ID | metric_name |
Please see Access Control for details.