AWS 로그 통합

Datadog API를 통해 바로 Datadog-AWS-Logs 통합을 구성하세요. 자세한 정보는 AWS 통합 페이지를 참고하세요.

GET https://api.ap1.datadoghq.com/api/v1/integration/aws/logshttps://api.datadoghq.eu/api/v1/integration/aws/logshttps://api.ddog-gov.com/api/v1/integration/aws/logshttps://api.datadoghq.com/api/v1/integration/aws/logshttps://api.us3.datadoghq.com/api/v1/integration/aws/logshttps://api.us5.datadoghq.com/api/v1/integration/aws/logs

개요

List all Datadog-AWS Logs integrations configured in your Datadog account. This endpoint requires the aws_configuration_read permission.

응답

OK

Expand All

항목

유형

설명

account_id

string

Your AWS Account ID without dashes.

lambdas

[object]

List of ARNs configured in your Datadog account.

arn

string

Available ARN IDs.

services

[string]

Array of services IDs.

{
  "account_id": "1234567",
  "lambdas": [
    {
      "arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"
    }
  ],
  "services": [
    "s3",
    "elb",
    "elbv2",
    "cloudfront",
    "redshift",
    "lambda"
  ]
}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

dog.aws_logs_integrations_list

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.ap1.datadoghq.com/api/v1/integration/aws/logshttps://api.datadoghq.eu/api/v1/integration/aws/logshttps://api.ddog-gov.com/api/v1/integration/aws/logshttps://api.datadoghq.com/api/v1/integration/aws/logshttps://api.us3.datadoghq.com/api/v1/integration/aws/logshttps://api.us5.datadoghq.com/api/v1/integration/aws/logs

개요

Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection. This endpoint requires the aws_configuration_edit permission.

요청

Body Data (required)

AWS Log Lambda Async request body.

Expand All

항목

유형

설명

account_id [required]

string

Your AWS Account ID without dashes.

lambda_arn [required]

string

ARN of the Datadog Lambda created during the Datadog-Amazon Web services Log collection setup.

{
  "account_id": "1234567",
  "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"
}

응답

OK

Expand All

항목

유형

설명

No response body

{}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

config = {
    "account_id": '<AWS_ACCOUNT_ID>',
    "lambda_arn": 'arn:aws:lambda:<REGION>:<AWS_ACCOUNT_ID>:function:<LAMBDA_FUNCTION_NAME>'
  }

dog.aws_logs_add_lambda(config)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

DELETE https://api.ap1.datadoghq.com/api/v1/integration/aws/logshttps://api.datadoghq.eu/api/v1/integration/aws/logshttps://api.ddog-gov.com/api/v1/integration/aws/logshttps://api.datadoghq.com/api/v1/integration/aws/logshttps://api.us3.datadoghq.com/api/v1/integration/aws/logshttps://api.us5.datadoghq.com/api/v1/integration/aws/logs

개요

Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS account. This endpoint requires the aws_configuration_edit permission.

요청

Body Data (required)

Delete AWS Lambda ARN request body.

Expand All

항목

유형

설명

account_id [required]

string

Your AWS Account ID without dashes.

lambda_arn [required]

string

ARN of the Datadog Lambda created during the Datadog-Amazon Web services Log collection setup.

{
  "account_id": "1234567",
  "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"
}

응답

OK

Expand All

항목

유형

설명

No response body

{}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

config = {
    "account_id": '<AWS_ACCOUNT_ID>',
    "lambda_arn": 'arn:aws:lambda:<REGION>:<AWS_ACCOUNT_ID>:function:<LAMBDA_FUNCTION_NAME>'
  }

dog.aws_logs_integration_delete(config)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

Note: For the "v2" version of this endpoint, which is in beta, see Get list of AWS log ready services v2.

GET https://api.ap1.datadoghq.com/api/v1/integration/aws/logs/serviceshttps://api.datadoghq.eu/api/v1/integration/aws/logs/serviceshttps://api.ddog-gov.com/api/v1/integration/aws/logs/serviceshttps://api.datadoghq.com/api/v1/integration/aws/logs/serviceshttps://api.us3.datadoghq.com/api/v1/integration/aws/logs/serviceshttps://api.us5.datadoghq.com/api/v1/integration/aws/logs/services

개요

Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint. This endpoint requires the aws_configuration_read permission.

응답

OK

Expand All

항목

유형

설명

id

string

Key value in returned object.

label

string

Name of service available for configuration with Datadog logs.

{
  "id": "s3",
  "label": "S3 Access Logs"
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

dog.aws_logs_list_services

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/integration/aws/logs/serviceshttps://api.datadoghq.eu/api/v2/integration/aws/logs/serviceshttps://api.ddog-gov.com/api/v2/integration/aws/logs/serviceshttps://api.datadoghq.com/api/v2/integration/aws/logs/serviceshttps://api.us3.datadoghq.com/api/v2/integration/aws/logs/serviceshttps://api.us5.datadoghq.com/api/v2/integration/aws/logs/services

개요

Get a list of AWS services that can send logs to Datadog. This endpoint requires the aws_configuration_read permission.

응답

AWS Logs Services List object

AWS Logs Services response body

Expand All

항목

유형

설명

data [required]

object

AWS Logs Services response body

attributes

object

AWS Logs Services response body

logs_services [required]

[string]

List of AWS services that can send logs to Datadog

id [required]

string

The AWSLogsServicesResponseData id.

default: logs_services

type [required]

enum

The AWSLogsServicesResponseData type. Allowed enum values: logs_services

default: logs_services

{
  "data": {
    "attributes": {
      "logs_services": [
        "s3"
      ]
    },
    "id": "logs_services",
    "type": "logs_services"
  }
}

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration/aws/logs/services" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

POST https://api.ap1.datadoghq.com/api/v1/integration/aws/logs/serviceshttps://api.datadoghq.eu/api/v1/integration/aws/logs/serviceshttps://api.ddog-gov.com/api/v1/integration/aws/logs/serviceshttps://api.datadoghq.com/api/v1/integration/aws/logs/serviceshttps://api.us3.datadoghq.com/api/v1/integration/aws/logs/serviceshttps://api.us5.datadoghq.com/api/v1/integration/aws/logs/services

개요

Enable automatic log collection for a list of services. This should be run after running CreateAWSLambdaARN to save the configuration. This endpoint requires the aws_configuration_edit permission.

요청

Body Data (required)

Enable AWS Log Services request body.

Expand All

항목

유형

설명

account_id [required]

string

Your AWS Account ID without dashes.

services [required]

[string]

Array of services IDs set to enable automatic log collection. Discover the list of available services with the get list of AWS log ready services API endpoint.

{
  "account_id": "1234567",
  "services": [
    "s3",
    "elb",
    "elbv2",
    "cloudfront",
    "redshift",
    "lambda"
  ]
}

응답

OK

Expand All

항목

유형

설명

No response body

{}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

config = {
    "account_id": '<AWS_ACCOUNT_ID>',
    "services": ['s3', 'elb', 'elbv2', 'cloudfront', 'redshift', 'lambda']
  }

dog.aws_logs_save_services(config)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.ap1.datadoghq.com/api/v1/integration/aws/logs/services_asynchttps://api.datadoghq.eu/api/v1/integration/aws/logs/services_asynchttps://api.ddog-gov.com/api/v1/integration/aws/logs/services_asynchttps://api.datadoghq.com/api/v1/integration/aws/logs/services_asynchttps://api.us3.datadoghq.com/api/v1/integration/aws/logs/services_asynchttps://api.us5.datadoghq.com/api/v1/integration/aws/logs/services_async

개요

Test if permissions are present to add log-forwarding triggers for the given services and AWS account. Input is the same as for EnableAWSLogServices. Done async, so can be repeatedly polled in a non-blocking fashion until the async request completes.

  • Returns a status of created when it’s checking if the permissions exists in the AWS account.
  • Returns a status of waiting while checking.
  • Returns a status of checked and ok if the Lambda exists.
  • Returns a status of error if the Lambda does not exist.
This endpoint requires the aws_configuration_read permission.

요청

Body Data (required)

Check AWS Logs Async Services request body.

Expand All

항목

유형

설명

account_id [required]

string

Your AWS Account ID without dashes.

services [required]

[string]

Array of services IDs set to enable automatic log collection. Discover the list of available services with the get list of AWS log ready services API endpoint.

{
  "account_id": "1234567",
  "services": [
    "s3",
    "elb",
    "elbv2",
    "cloudfront",
    "redshift",
    "lambda"
  ]
}

응답

OK

A list of all Datadog-AWS logs integrations available in your Datadog organization.

Expand All

항목

유형

설명

errors

[object]

List of errors.

code

string

Code properties

message

string

Message content.

status

string

Status of the properties.

{
  "errors": [
    {
      "code": "no_such_config",
      "message": "AWS account 12345 has no Lambda config to update"
    }
  ],
  "status": "created"
}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

config = {
    "account_id": '<AWS_ACCOUNT_ID>',
    "services": ['s3', 'elb', 'elbv2', 'cloudfront', 'redshift', 'lambda']
  }

dog.aws_logs_check_services(config)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.ap1.datadoghq.com/api/v1/integration/aws/logs/check_asynchttps://api.datadoghq.eu/api/v1/integration/aws/logs/check_asynchttps://api.ddog-gov.com/api/v1/integration/aws/logs/check_asynchttps://api.datadoghq.com/api/v1/integration/aws/logs/check_asynchttps://api.us3.datadoghq.com/api/v1/integration/aws/logs/check_asynchttps://api.us5.datadoghq.com/api/v1/integration/aws/logs/check_async

개요

Test if permissions are present to add a log-forwarding triggers for the given services and AWS account. The input is the same as for Enable an AWS service log collection. Subsequent requests will always repeat the above, so this endpoint can be polled intermittently instead of blocking.

  • Returns a status of ‘created’ when it’s checking if the Lambda exists in the account.
  • Returns a status of ‘waiting’ while checking.
  • Returns a status of ‘checked and ok’ if the Lambda exists.
  • Returns a status of ’error’ if the Lambda does not exist.
This endpoint requires the aws_configuration_read permission.

요청

Body Data (required)

Check AWS Log Lambda Async request body.

Expand All

항목

유형

설명

account_id [required]

string

Your AWS Account ID without dashes.

lambda_arn [required]

string

ARN of the Datadog Lambda created during the Datadog-Amazon Web services Log collection setup.

{
  "account_id": "1234567",
  "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"
}

응답

OK

A list of all Datadog-AWS logs integrations available in your Datadog organization.

Expand All

항목

유형

설명

errors

[object]

List of errors.

code

string

Code properties

message

string

Message content.

status

string

Status of the properties.

{
  "errors": [
    {
      "code": "no_such_config",
      "message": "AWS account 12345 has no Lambda config to update"
    }
  ],
  "status": "created"
}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

config = {
    "account_id": '<AWS_ACCOUNT_ID>',
    "lambda_arn": 'arn:aws:lambda:<REGION>:<AWS_ACCOUNT_ID>:function:<LAMBDA_FUNCTION_NAME>'
  }

dog.aws_logs_check_lambda(config)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

PREVIEWING: drodriguezhdez/add_public_docs_log_summarization