Hello!
It is not necessary to create your own image; you can connect the config file from S3.
"config-file-type": "s3", "config-file-value": "arn:aws:s3:::yourbucket/yourdirectory/extra.conf"
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
I didn't find any mention the logConfiguration setup on the container definition level with a logDriver of awsfirelens? something like:
"logConfiguration": {
"logDriver": "awsfirelens",
"options": {
"compress": "gzip",
"provider": "ecs",
"dd_service": "prefix-service-service",
"Host": "http-intake.logs.datadoghq.com",
"TLS": "on",
"dd_source": "python-grpc",
"dd_tags": "env:dev, prefix-service-dev",
"Name": "datadog"
},
"secretOptions": [
{
"name": "apikey",
"valueFrom": "arn:aws:secretsmanager:us-east-2:12121212121:secret:datadog_dev:dd_api_key::"
}
]
}
Full details for the issue I am facing: https://stackoverflow.com/questions/78632920/aws-ecs-fargate-send-logs-to-multiple-destinations-aws-s3-and-datadog
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
The article didn't mention the logConfiguration
setup on the container definition level with a logDriver
of awsfirelens
?, I was getting this error:
Error: failed creating ECS Task Definition (prefix-service-dev): ClientException: When a firelensConfiguration
object is specified, at least one container has to be configured with the awsfirelens
log driver.
I used this article for forwarding logs to NewRelic and Cloudwatch and it worked with making some changes. Main Container logConfiguration-
"logConfiguration": {
"logDriver": "awsfirelens"
}
And, also need to add the Newrelic plugin to the docker image and mention Path for it. dockerfile-
FROM amazon/aws-for-fluent-bit:latest
ADD logDestinations.conf /logDestinations.conf
ADD out_newrelic-linux-amd64-1.19.2.so /out_newrelic-linux-amd64-1.19.2.so
ADD plugins.conf /plugins.conf
logDestination.conf
[SERVICE]
Plugins_File /plugins.conf
[OUTPUT]
name nrlogs
match *
api_key YOUR_API_KEY_HERE
[OUTPUT]
Name cloudwatch_logs
Match *
region us-east-1
log_group_name fluent-bit-cloudwatch
log_stream_prefix from-fluent-bit-
auto_create_group On
plugins.conf
[PLUGINS]
Path /out_newrelic-linux-amd64-1.19.2.so
Rest the configuration for sidecar was the same as mentioned in the article.
Reference document- link Plugin download
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Relevant content
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 7 months ago