Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker]: ANSI escape sequences in log messages #11874

Open
ulab opened this issue Nov 26, 2024 · 0 comments
Open

[docker]: ANSI escape sequences in log messages #11874

ulab opened this issue Nov 26, 2024 · 0 comments
Labels
Integration:docker Docker needs:triage Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team [elastic/obs-cloudnative-monitoring]

Comments

@ulab
Copy link

ulab commented Nov 26, 2024

Integration Name

Docker [docker]

Dataset Name

docker.container_logs

Integration Version

2.12.0

Agent Version

8.15.4

Agent Output Type

elasticsearch

Elasticsearch Version

8.15.4

OS Version and Architecture

Debian 11.11

Software/API Version

No response

Error Message

With the default installation docker logs contain ANSI escape sequences to display fancy colors. These should be removed by default.

Event Original

No response

What did you do?

Currently I am doing the following in the logs-docker.container_logs@custom Pipeline:

[
  {
    "gsub": {
      "field": "message",
      "pattern": "\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|M|K]",
      "replacement": "",
      "ignore_missing": true,
      "description": "mutate-ansii-colours in message"
    }
  },
  {
    "gsub": {
      "field": "log.level",
      "pattern": "\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|M|K]",
      "replacement": "",
      "ignore_missing": true,
      "description": "mutate-ansii-colours in log.level"
    }
  }
]

This is from Jason Neurohr's blog entry.

What did you see?

ANSI sequences

What did you expect to see?

No ANSI sequences.

Anything else?

No response

@andrewkroh andrewkroh added Integration:docker Docker Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team [elastic/obs-cloudnative-monitoring] labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:docker Docker needs:triage Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team [elastic/obs-cloudnative-monitoring]
Projects
None yet
Development

No branches or pull requests

2 participants