Summary
Despite attempting multiple valid multiline.pattern
configurations, Filebeat v9.0.1 fails to parse multiline log entries correctly from a plain text log file located inside a container. The logs contain Python stack traces and standard application logs. Filebeat continues to treat each line as a separate log event, breaking multiline messages across documents.
Environment Details
- Filebeat Version: 9.0.1
- Input Type:
filestream
- Deployment: Docker (running inside a container)
- Log Source: Application writes to
/app/log/techsavvyrc.log
- Multiline Log Format: Python stack traces + timestamped log entries
Sample Log File (
techsavvyrc.log
)
self.raise_routing_exception(req)
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 500, in raise_routing_exception
raise request.routing_exception # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/ctx.py", line 362, in match_request
result = self.url_adapter.match(return_rule=True) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/werkzeug/routing/map.py", line 629, in match
raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2025-06-06 18:07:41,725 [INFO] service=techsavvyrc trace_id=fc54dfdec4be2a556bf7c8da0ed54a16 span_id=0d8069e49e6f7a83 Home page accessed
2025-06-06 18:08:12,803 [ERROR] service=techsavvyrc trace_id=2cf92917d8e8d5afe7846b2929e86277 span_id=92afc27e7bedd256 Unhandled exception: 405 Method Not Allowed: The method is not allowed for the requested URL.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 891, in dispatch_request
self.raise_routing_exception(req)
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 500, in raise_routing_exception
raise request.routing_exception # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/ctx.py", line 362, in match_request
result = self.url_adapter.match(return_rule=True) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/werkzeug/routing/map.py", line 624, in match
raise MethodNotAllowed(valid_methods=list(e.have_match_for)) from None
werkzeug.exceptions.MethodNotAllowed: 405 Method Not Allowed: The method is not allowed for the requested URL.
filebeat.yml Configuration
############################# General Filebeat Settings ##############################
name: "filebeat-techsavvyrc"
tags: ["techsavvyrc-app", "docker", "training", "testing"]
fields:
environment: "testing"
############################### Paths & Idempotence ###############################
# Path to the directory where this filebeat.yml is located:
path.config: "/usr/share/filebeat"
# Path where Filebeat will store its registry (offsets, state, etc.)
# (Defaults to $path.home/data, but we override explicitly here.)
path.data: "/usr/share/filebeat/data"
# Path where Filebeat writes its own logs.
path.logs: "/usr/share/filebeat/logs_filebeat"
########################## Filebeat Input: filestream ##############################
filebeat.inputs:
- type: filestream
id: "techsavvyrc-app-log"
enabled: true
paths:
- "/usr/share/filebeat/logs/techsavvyrc.log"
multiline:
type: pattern
pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} '
#pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} \[[A-Z]+\]'
#pattern: '^(\d{4}-\d{2}-\d{2})|(\s+File)|(\s+Traceback)'
#pattern: '^\s'
#pattern: '^\['
match: after
negate: false
max_lines: 500
timeout: 10s
ignore_older: 0s
processors:
- add_fields:
target: ""
fields:
service: "techsavvyrc-app"
log_source: "internal"
- add_host_metadata: {}
########################### Placeholders for Future Modules ########################
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
############################## Output Configuration #################################
#output.logstash:
# hosts: ["logstash:5044"]
# loadbalance: false
# bulk_max_size: 200
# worker: 1
output.console:
enabled: true
pretty: true
########################### Buffering & Queue Controls ##############################
queue.mem:
events: 4096
flush.min_events: 1024
flush.timeout: 1s
############################ Filebeat’s Own Logging #################################
logging.level: debug
logging.selectors: ["*multiline*"]
logging.to_files: true
logging.files:
path: "/usr/share/filebeat/logs_filebeat"
name: "filebeat.log"
rotateeverybytes: 10485760
keepfiles: 7
permissions: 0644
logging.to_syslog: false
logging.json: false
logging.metrics.enabled: false
logging.metrics.period: 30s
Docker Compose Snippet
filebeat:
image: docker.elastic.co/beats/filebeat:${ELK_VERSION}
container_name: filebeat
user: root
volumes:
- ./filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- ./techsavvyrc/app/log:/usr/share/filebeat/logs:ro
depends_on:
- logstash
networks:
- observability
Multiline Patterns Tried (All Failed)
We tested all the following patterns with appropriate negate
and match
logic, but Filebeat still failed to group multiline events correctly:
1) pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} '
2) pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} \[[A-Z]+\]'
3) pattern: '^(\d{4}-\d{2}-\d{2})|(\s+File)|(\s+Traceback)'
4) pattern: '^\s'
5) pattern: '^\['
Observed Filebeat Console Output
{
"@timestamp": "2025-06-08T01:03:12.929Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"host": {
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
]
},
"ecs": {
"version": "8.0.0"
},
"message": "2025-06-08 00:47:02,070 [INFO] service=techsavvyrc trace_id=0f0c92999ee3fb4d4cbd675af83568aa span_id=4f1e9ca612d79253 Home page accessed",
"log_source": "internal",
"agent": {
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513"
},
"log": {
"file": {
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512"
},
"offset": 57514
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"input": {
"type": "filestream"
},
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app"
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"message": "2025-06-08 01:04:06,129 [INFO] service=techsavvyrc trace_id=1b81f97de2fcee75787bc37f36608354 span_id=3775fdb29dda10dc Home page accessed",
"input": {
"type": "filestream"
},
"service": "techsavvyrc-app",
"host": {
"architecture": "x86_64",
"os": {
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661"
},
"ecs": {
"version": "8.0.0"
},
"agent": {
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc"
},
"log": {
"offset": 57651,
"file": {
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4"
}
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"fields": {
"environment": "testing"
},
"log_source": "internal"
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"message": "2025-06-08 01:04:06,657 [ERROR] service=techsavvyrc trace_id=d3ac98f8ebf989fb4d7acd2b39139c98 span_id=71ae04aba190dd39 Unhandled exception: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"fields": {
"environment": "testing"
},
"input": {
"type": "filestream"
},
"log_source": "internal",
"ecs": {
"version": "8.0.0"
},
"agent": {
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945"
},
"log": {
"offset": 57788,
"file": {
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4"
}
},
"service": "techsavvyrc-app",
"host": {
"architecture": "x86_64",
"os": {
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"log": {
"file": {
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512"
},
"offset": 58064
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"log_source": "internal",
"host": {
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false
},
"message": "Traceback (most recent call last):",
"input": {
"type": "filestream"
},
"ecs": {
"version": "8.0.0"
},
"agent": {
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"fields": {
"environment": "testing"
},
"host": {
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d"
},
"agent": {
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1"
},
"message": " File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 917, in full_dispatch_request",
"service": "techsavvyrc-app",
"log_source": "internal",
"ecs": {
"version": "8.0.0"
},
"log": {
"offset": 58099,
"file": {
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4"
}
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"input": {
"type": "filestream"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"ecs": {
"version": "8.0.0"
},
"message": " rv = self.dispatch_request()",
"log": {
"offset": 58197,
"file": {
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4"
}
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"log_source": "internal",
"agent": {
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc"
},
"input": {
"type": "filestream"
},
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"host": {
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"log_source": "internal",
"ecs": {
"version": "8.0.0"
},
"agent": {
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc"
},
"log": {
"offset": 58230,
"file": {
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4"
}
},
"message": " ^^^^^^^^^^^^^^^^^^^^^^^",
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"input": {
"type": "filestream"
},
"host": {
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
]
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"log": {
"offset": 58263,
"file": {
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512"
}
},
"input": {
"type": "filestream"
},
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"log_source": "internal",
"host": {
"architecture": "x86_64",
"os": {
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661"
},
"ecs": {
"version": "8.0.0"
},
"message": " File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 891, in dispatch_request",
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"agent": {
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"ecs": {
"version": "8.0.0"
},
"message": " self.raise_routing_exception(req)",
"service": "techsavvyrc-app",
"agent": {
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513"
},
"log": {
"offset": 58356,
"file": {
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512"
}
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"input": {
"type": "filestream"
},
"fields": {
"environment": "testing"
},
"log_source": "internal",
"host": {
"os": {
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"log": {
"offset": 58394,
"file": {
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000"
}
},
"message": " File \"/usr/local/lib/python3.11/site-packages/flask/app.py\", line 500, in raise_routing_exception",
"input": {
"type": "filestream"
},
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"host": {
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d"
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"log_source": "internal",
"agent": {
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513"
},
"ecs": {
"version": "8.0.0"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"log": {
"offset": 58494,
"file": {
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512"
}
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"log_source": "internal",
"agent": {
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc"
},
"ecs": {
"version": "8.0.0"
},
"message": " raise request.routing_exception # type: ignore[misc]",
"input": {
"type": "filestream"
},
"host": {
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow"
}
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"log": {
"offset": 58552,
"file": {
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log"
}
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"input": {
"type": "filestream"
},
"service": "techsavvyrc-app",
"log_source": "internal",
"host": {
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow"
}
},
"message": " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
"fields": {
"environment": "testing"
},
"ecs": {
"version": "8.0.0"
},
"agent": {
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1"
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"input": {
"type": "filestream"
},
"service": "techsavvyrc-app",
"log_source": "internal",
"agent": {
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat"
},
"ecs": {
"version": "8.0.0"
},
"message": " File \"/usr/local/lib/python3.11/site-packages/flask/ctx.py\", line 362, in match_request",
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"fields": {
"environment": "testing"
},
"host": {
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64",
"os": {
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
]
},
"log": {
"offset": 58588,
"file": {
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log"
}
}
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"ecs": {
"version": "8.0.0"
},
"log": {
"offset": 58678,
"file": {
"device_id": "64512",
"inode": "21144000",
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log"
}
},
"input": {
"type": "filestream"
},
"log_source": "internal",
"host": {
"os": {
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow",
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64"
},
"agent": {
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc",
"type": "filebeat",
"version": "9.0.1"
},
"message": " result = self.url_adapter.match(return_rule=True) # type: ignore",
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app"
}
{
"@timestamp": "2025-06-08T01:04:06.946Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "9.0.1"
},
"tags": [
"techsavvyrc-app",
"docker",
"training",
"testing"
],
"input": {
"type": "filestream"
},
"fields": {
"environment": "testing"
},
"service": "techsavvyrc-app",
"ecs": {
"version": "8.0.0"
},
"log": {
"offset": 58748,
"file": {
"fingerprint": "8197fc07ed22b6ff1b9e22274649b6ebe92af7af2e7bc19fcf075651e3cca7c4",
"path": "/usr/share/filebeat/logs/techsavvyrc.log",
"device_id": "64512",
"inode": "21144000"
}
},
"message": " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
"log_source": "internal",
"host": {
"os": {
"type": "linux",
"platform": "rhel",
"version": "9.5 (Plow)",
"family": "redhat",
"name": "Red Hat Enterprise Linux",
"kernel": "5.15.0-307.178.5.el9uek.x86_64",
"codename": "Plow"
},
"id": "3d9d42d5c57d9921c87b9df2e384013d",
"containerized": false,
"ip": [
"172.17.0.2"
],
"mac": [
"E2-62-79-36-C4-3A"
],
"name": "96eecd0e2661",
"hostname": "96eecd0e2661",
"architecture": "x86_64"
},
"agent": {
"type": "filebeat",
"version": "9.0.1",
"ephemeral_id": "1f94efb3-f6b6-4b45-b427-d963b907f513",
"id": "03c75959-aa81-4812-b6a6-f2477d26b945",
"name": "filebeat-techsavvyrc"
}
}
Steps Tried
- Verified the log file is accessible inside the container.
- Confirmed format: each exception stack trace is indented, and new entries start with a clear timestamp.
- Cleared registry:
rm -rf /usr/share/filebeat/data/registry
- Enabled debug:
filebeat -e -d "multiline"
Expected Behavior
Filebeat should group stack traces and related lines with the original timestamped log line as one cohesive event.
Actual Behavior
Each line, including indented traceback lines, is sent as a separate log event. No multiline grouping occurs.
Request for Help
Please assist with:
- Identifying if this is a regression or behavioral change in Filebeat v9.0.1.
- Confirming whether the registry, encoding, or buffering logic changed.
- Suggesting a working multiline pattern or workaround.
Docker Commands Used
1) docker run --rm -it -v "$(pwd)/filebeat/filebeat.yml":/usr/share/filebeat/filebeat.yml -v "$(pwd)/techsavvyrc/app/log":/usr/share/filebeat/logs docker.elastic.co/beats/filebeat:9.0.1 -e -d "multiline"
2) docker run --rm -it -v "$(pwd)/filebeat/filebeat.yml":/usr/share/filebeat/filebeat.yml -v "$(pwd)/techsavvyrc/app/log":/usr/share/filebeat/logs docker.elastic.co/beats/filebeat:9.0.1 bash
3) docker logs -f filebeat
4) docker exec -it filebeat /bin/bash