A new index for each container?

Hi,

I am currently running a test environment to try gelf logging driver to monitor container logs with a single node stack and so far it worked well. But I need to make some changes and I'm pretty new to this so I need some help. Each container's logs are being sent to a single index which is "logstash*", I want seperate indexes for each container preferebly using gelf logging driver. If this has a solution through another driver I'm open to hear that as well.

Thanks in advance.

I found the solution for this if anyone else gets stuck at this,

add a tag option when creating your container with the other logging driver options you have.
then change your logstash.conf output:

output {
    elasticsearch {
        hosts => ["elasticsearch:9200"]
        index => "%{tag}-%{+YYYY-MM-dd}"
    }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.