Open teggno opened 5 years ago
@teggno By default when the log gets to Logz.io we override the type value with the container image name
@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:
@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?
@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.
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.