For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/logs-indexes/update-an-index.md. A documentation index is available at /llms.txt.
Language
Datadog site

인덱스 업데이트하기

PUThttps://api.datadoghq.com/api/v1/logs/config/indexes/{name}https://api.us3.datadoghq.com/api/v1/logs/config/indexes/{name}https://api.us5.datadoghq.com/api/v1/logs/config/indexes/{name}https://api.datadoghq.eu/api/v1/logs/config/indexes/{name}https://api.ap1.datadoghq.com/api/v1/logs/config/indexes/{name}https://api.ap2.datadoghq.com/api/v1/logs/config/indexes/{name}https://api.uk1.datadoghq.com/api/v1/logs/config/indexes/{name}https://api.ddog-gov.com/api/v1/logs/config/indexes/{name}https://api.us2.ddog-gov.com/api/v1/logs/config/indexes/{name}

개요

이름으로 식별되는 인덱스를 업데이트합니다. 요청이 성공하면 요청 본문에 전달된 인덱스 객체를 반환합니다.

PUT 메서드를 사용하면 현재 구성을 Datadog 조직에 전송된 새 구성으로 대체하여 인덱스의 구성을 업데이트합니다.

인수

경로 파라미터

이름
유형
설명
name [required]
string

Name of the log index.

요청

Body Data (required)

새로운 LogsIndexUpdateRequest를 포함한 객체입니다.

항목
유형
설명
daily_limit
int64

Datadog 로그 인덱스를 업데이트하기 위한 객체입니다.

daily_limit_reset
object

Object containing options to override the default daily limit reset time.

daily_limit_warning_threshold_percentage
double

A percentage threshold of the daily quota at which a Datadog warning event is generated.

disable_daily_limit
boolean

If true, sets the daily_limit value to null and the index is not limited on a daily basis (any specified daily_limit value in the request is ignored). If false or omitted, the index's current daily_limit is maintained.

exclusion_filters
[object]

An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.

filter [required]
object

Filter for logs.

num_flex_logs_retention_days
int64

The total number of days logs are stored in Standard and Flex Tier before being deleted from the index. If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through num_retention_days, and then stored in Flex Tier until the number of days specified in num_flex_logs_retention_days is reached. The available values depend on retention plans specified in your organization's contract/subscriptions.

Note: Changing this value affects all logs already in this index. It may also affect billing.

num_retention_days
int64

The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index. The available values depend on retention plans specified in your organization's contract/subscriptions.

Note: Changing this value affects all logs already in this index. It may also affect billing.

tags
[string]

A list of tags associated with the index. Tags must be in key:value format.

응답

OK

Object describing a Datadog Log index.

항목
유형
설명
daily_limit
int64

The number of log events you can send in this index per day before you are rate-limited.

daily_limit_reset
object

Object containing options to override the default daily limit reset time.

daily_limit_warning_threshold_percentage
double

A percentage threshold of the daily quota at which a Datadog warning event is generated.

exclusion_filters
[object]

An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.

filter [required]
object

Filter for logs.

is_rate_limited
boolean

A boolean stating if the index is rate limited, meaning more logs than the daily limit have been sent. Rate limit is reset every-day at 2pm UTC.

name [required]
string

The name of the index.

num_flex_logs_retention_days
int64

The total number of days logs are stored in Standard and Flex Tier before being deleted from the index. If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through num_retention_days, and then stored in Flex Tier until the number of days specified in num_flex_logs_retention_days is reached. The available values depend on retention plans specified in your organization's contract/subscriptions.

num_retention_days
int64

The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index. The available values depend on retention plans specified in your organization's contract/subscriptions.

tags
[string]

A list of tags associated with the index. Tags must be in key:value format.

코드 예시

인덱스 업데이트하기
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF
# Path parameters
export name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PUT "https://api.${DD_SITE}/api/v1/logs/config/indexes/${name}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "daily_limit": 300000000,
  "daily_limit_warning_threshold_percentage": 70,
  "disable_daily_limit": false,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_rate": 1
      },
      "is_enabled": true,
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_retention_days": 15
}
EOF