Skip to content

datadog create-log-index

Creates a new index

Description

Creates a new index

Synopsis

datadog create-log-index
    [--site <site>]
    --query <query>
    --name <name>
    [--retention_days <retention_days>]
    [--daily_limit <daily_limit>]
    --exclusion_filters <exclusion_filters>

Arguments

site - (string)

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

query - (string)

     The filter query
     Example: --query "query-1"
     Default: _None_      Attributes: required

name - (string)

     The name of the index
     Example: --name "name-1"
     Default: _None_      Attributes: required

retention_days - (int)

     The number of days before logs are deleted from this index. Available values depend on organization's subscriptions
     Example: --retention_days 1
     Default: _None_      Attributes: optional

daily_limit - (int)

     The number of log events you can send in this index per day before you are rate-limited
     Example: --daily_limit 1
     Default: _None_      Attributes: optional

exclusion_filters - (string)

     json string of exclusion object
     Example: --exclusion_filters "{ "filter": { "query": "*", "sample_rate": 1 }, "is_enabled": false, "name": "name of filter" }"
     Default: _None_      Attributes: required, multiple allowed

Examples

Input:

!datadog create-log-index
Output:
NAME            FILTER-QUERY    RETENTION-DAYS  EXCLUSION-FILTERS
sdcsdfcsfddddd  source:python               15  payment, payment

Access Control

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

Field Value
Action "create"
Service Type "datadog"
Service Instance
Namespace
Object Type "indexes"
Object ID

Please see Access Control for details.