Skip to content

datadog get-monitor-details

Get data of monitors

Description

Get data of monitors

Synopsis

datadog get-monitor-details
    [--site <site>]
    [--monitor <monitor>]
    [--group_states <group_states>]
    [--name <name>]
    [--tags <tags>]
    [--monitor_tags <monitor_tags>]
    [--downtimes]
    [--offset <offset>]
    [--page <page>]
    [--page_size <page_size>]

Arguments

site - (string)

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

monitor - (int)

     The ID of the monitor
     Example: --monitor 1
     Default: _None_      Attributes: optional

group_states - (string)

     When specified, shows additional information about the group states
     Example: --group_states "group_states-1"
     Default: _None_      Attributes: optional

     Validation:
         allowed values: all, alert, warn, no data

name - (string)

     A string to filter monitors by name
     Example: --name "name-1"
     Default: _None_      Attributes: optional

tags - (string)

     A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. For example, host:host0
     Example: --tags "tags-1"
     Default: _None_      Attributes: optional

monitor_tags - (string)

     A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors
     Example: --monitor_tags "monitor_tags-1"
     Default: _None_      Attributes: optional

downtimes - (bool)

     If this argument is set to true, then the returned data includes all current active downtimes for each monitor
     Example: --downtimes
     Default: false      Attributes: optional

offset - (int)

     Use this parameter for paginating through large sets of monitors
     Example: --offset 1
     Default: 0      Attributes: optional

page - (int)

     The page to start paginating from
     Example: --page 1
     Default: _None_      Attributes: optional

page_size - (int)

     The number of monitors to return per page
     Example: --page_size 1
     Default: 50      Attributes: optional

Examples

Input:

!datadog get-monitor-details
Output:
ID      NAME        TYPE        MESSAGE         PRIORITY    QUERY                                                       CREATOR
78566   testName    query alert create moniotr         3    avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
78568   testNamed   query alert create moniotr         3    avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
78569   testNames   query alert create moniotr         3    avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
78570   testNames2  query alert create moniotr         3    avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
Input:
!datadog get-monitor-details --monitor 78566
Output:
ID      NAME        TYPE        MESSAGE         PRIORITY    QUERY                                                       CREATOR
78566   testName    query alert create moniotr         3    avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT

Access Control

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

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

Please see Access Control for details.