We're working on upgrading from 6.6/6/7 to 7.1 and have noticed the following changes which we can't find mentions of in the release notes and/or documentation:
-
When using add_docker_metadata, [container] used to be nested under [docker][container]. As of 7.x, it looks like [docker] is missing, and everything is under [container].
-
Docker labels are "flat" now.
Pre-7.0:
"docker": {
"container": {
"name": "container-name",
"id": "058dcd11e4f719bd2514f6a7bf242a5a8b4233b8f111cfff159b83ba226b9cc6",
"labels": {
"com": {
"amazonaws": {
"ecs": {
"task-definition-version": "1192",
"container-name": "container-name",
"task-definition-family": "task-family",
"task-arn": "arn:aws:ecs:us-east-1:1234554545:task/b16c034f-daeb-4ba3-9176-ed239862d4b8",
"cluster": "main"
}
Post-7.x:
{
"container": {
"name": "container-name",
"id": "058dcd11e4f719bd2514f6a7bf242a5a8b4233b8f111cfff159b83ba226b9cc6",
"labels": {
"com_amazonaws_ecs_task-arn": "arn:aws:ecs:us-east-1:12345678:task/b16c034f-daeb-4ba3-9176-ed239862d4b8",
"com_amazonaws_ecs_cluster": "main",
"com_amazonaws_ecs_task-definition-version": "1192",
"com_amazonaws_ecs_container-name": "container-name",
"com_amazonaws_ecs_task-definition-family": "task-family"
},
Is there anyway to get the nested labels back?
- When using add_cloud_metadata, the metadata used to be nested under [meta][cloud], now it's just under [cloud].
Pre-7.x:
"meta": {
"cloud": {
"availability_zone": "us-east-1d",
"provider": "ec2",
"instance_id": "i-jklfdslkfds",
"machine_type": "m5.2xlarge",
"region": "us-east-1"
}
},
Post-7.x:
"cloud": {
"instance": {
"id": "i-fdsfdsfdsfdsfd"
},
"availability_zone": "us-east-1d",
"provider": "aws",
"region": "us-east-1",
"machine": {
"type": "m5.2xlarge"
}
}
Here is the configuration that we are using which has not changed since 6.x:
filebeat.inputs:
- type: docker
containers.ids: '*'
json.add_error_key: false
json.message_key: message
json.ignore_decoding_error: true
processors:
- add_docker_metadata: ~
- add_cloud_metadata: ~
output.logstash:
enabled: true
hosts: ["${LOGSTASH_HOST}:10200"]
ttl: 60s
logging.to_files: false
max_retries: -1
Can someone give me a hand here? Are these changes expected? If so, are they documented? Can I revert to the old nested version of docker labels?