Running metricbeat on ECS cluster in it's own docker container. running my application (including apache with the application) on another container. Both my app and apache log to STDOUT. have metricbeats setup for auto discovery but no apache logs are coming in.
metricbeat.autodiscover:
providers:
- type: docker
hints.enabled: true
- type: docker
templates:
- condition:
contains:
docker.container.labels.applicationModules: "apache"
config:
- module: apache
metricsets: ["status"]
period: 10s
hosts: ["${data.host}:${data.port}"]
I set this label on my docker container when starting it up using the ecs task. I can see some log info but it's the format. example message
{
"_index": "metricbeat-6.5.4-2019.03.14",
"_type": "doc",
"_id": "asdfsdkjfsk",
"_version": 1,
"_score": null,
"_source": {
"@timestamp": "2019-03-14T19:55:00.791Z",
"docker": {
"container": {
"id": "asdjkhkj3n4rj3n4nrksdjcow4r",
"labels": {
"environment": "dev",
"applicationModules": "apache",
"applicationName": "myapp"
}
}
},
"beat": {
"name": "Elastic-Metricbeat.weave.local",
"hostname": "Elastic-Metricbeat.weave.local",
"version": "6.5.4"
},
"host": {
"name": "Elastic-Metricbeat.weave.local"
},
"metricset": {
"host": "121.44.0.56:443",
"rtt": 4128,
"name": "status",
"module": "apache"
},
"error": {
"message": "HTTP error 400 in status: 400 Bad Request"
}
},
"fields": {
"@timestamp": [
"2019-03-14T19:55:00.791Z"
]
},
"highlight": {
"docker.container.labels.applicationName": [
"@kibana-highlighted-field@alert-api@/kibana-highlighted-field@"
],
"metricset.module": [
"@kibana-highlighted-field@apache@/kibana-highlighted-field@"
]
},
"sort": [
1552593300791
]
}
looking more at the data it seems like Im only getting metrics from metricbeat, how do I get them from the other docker containers running?