Skip to content

datadog list-events

The event stream can be queried and filtered

Description

The event stream can be queried and filtered

Synopsis

datadog list-events
    [--site <site>]
    [--event <event>]
    --start <start>
    --end <end>
    [--priority <priority>]
    [--sources <sources>]
    [--tags <tags>]
    [--unaggregated]
    [--exclude_aggregate]
    [--page <page>]

Arguments

site - (string)

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

event - (string)

     Id for specific event search
     Example: --event "event-1"
     Default: _None_      Attributes: optional

start - (time)

     search events after this time
     Example: --start "2019-10-12T07:20:50.52Z"
     Default: 1 hour ago      Attributes: required

end - (time)

     search events before this time
     Example: --end "2019-10-12T07:20:50.52Z"
     Default: _None_      Attributes: required

priority - (string)

     Priority of your events, either low or normal
     Example: --priority "priority-1"
     Default: _None_      Attributes: optional

     Validation:
         allowed values: normal, low

sources - (string)

     Sources.
     Example: --sources "sources-1"
     Default: _None_      Attributes: optional, multiple allowed

tags - (string)

     Tags, if any, should be used to filter the list of events
     Example: --tags "tags-1"
     Default: _None_      Attributes: optional, multiple allowed

unaggregated - (bool)

     Set unaggregated to true to return all events within the specified [start,end] timeframe
     Example: --unaggregated
     Default: false      Attributes: optional

exclude_aggregate - (bool)

     If the exclude_aggregate parameter is set to true, then the unaggregated parameter is ignored and will be true by default
     Example: --exclude_aggregate
     Default: false      Attributes: optional

page - (int)

     Set page to the number of the page to return with 0 being the first page 1000 results are returned per request
     Example: --page 1
     Default: _None_      Attributes: optional

Examples

Input:

 !datadog list-events --event "6863321649093935973"
Output:
ID                  ALERT-TYPE  TITLE       TEXT            TAGS                                HOST    DEVICE      PRIORITY
6863321649093935973 error       helloEvents EventBodyHere   source:my_apps, tag1, tag2, tag3    kira    death Note  normal

Access Control

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

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

Please see Access Control for details.