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

Different type per container #7

Open
teggno opened this issue Jun 3, 2019 · 4 comments
Open

Different type per container #7

teggno opened this issue Jun 3, 2019 · 4 comments

Comments

@teggno
Copy link

teggno commented Jun 3, 2019

Currently, a type can be specified using the LOGZIO_TYPE environment variable. It would be nice if a different type could be configured for each container thats logs are collected with the docker-collector-logs container.

For example, on the same docker host I'm running two containers, one node container running a web API with custom logging and an nginx container with its default logging. It would be nice to collect the logs of both of them but with different types as their log formats are different.

@idohalevi
Copy link
Contributor

@teggno
By default when the log gets to Logz.io we override the type value with the container image name

@teggno
Copy link
Author

teggno commented Jun 3, 2019

@idohalevi
Thank you. For my overly simplified example, this would do. But I'm actually running more than just two containers on the host. Some of them share a common log format, some don't. There it would be useful to have container specific types. I could then configure something like:

  • container1: type=A
  • container2: type=A
  • container3: type=B

@idohalevi
Copy link
Contributor

@teggno
So prefer you want the same type per two different images?
Not against it just not sure it's needed. Can you explain the use case in logz.io where you would need two different types for different images and can't use docker.container.name instead?

@teggno
Copy link
Author

teggno commented Jun 3, 2019

@idohalevi
It's because the "Data Parsing" feature of logz.io is using the type field. I could of course just have the LOGZIO_TYPE variable empty and thus get the container name as type but then I'd have to configure the same "Data Parsing" multiple times. This is of course not that big a problem but still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants