Skip to content

datadog list-monitors

Get list of monitors using the specified options

Description

Get list of monitors using the specified options

Synopsis

datadog list-monitors
    [--site <site>]
    [--query <query>]
    [--page <page>]
    [--size <size>]
    [--sort_key <sort_key>]
    [--sort <sort>]

Arguments

site - (string)

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

query - (string)

     After entering a search query in your Manage Monitor page use the query parameter value in the URL of the page as value for this parameter
     Example: --query "query-1"
     Default: _None_      Attributes: optional, multiple allowed

page - (int)

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

size - (int)

     Number of monitors to return per page
     Example: --size 1
     Default: _None_      Attributes: optional

sort_key - (string)

     String for sort field
     Example: --sort_key "sort_key-1"
     Default: _None_      Attributes: optional

     Validation:
         allowed values: name, status, tags

sort - (string)

     Sort directions
     Example: --sort "sort-1"
     Default: _None_      Attributes: optional

     Validation:
         allowed values: asc, desc

Examples

Input:

!datadog list-monitors
Output:
ID      NAME        STATUS  TYPE        SCOPES      QUERY                                                       CREATOR
78570   testNames2  No Data query alert host:host0  avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
78566   testName    No Data query alert host:host0  avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
78569   testNames   No Data query alert host:host0  avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100    Avinash Bharti - EXT
78568   testNamed   No Data query alert host:host0  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.