SumoLogic / sumologic-collector-docker

A Sumo Logic collector for Docker.
Apache License 2.0
69 stars 56 forks source link

Resume collector if container is terminated? #71

Closed jmreicha closed 5 years ago

jmreicha commented 5 years ago

I am running the collector container in Kubernetes as a daemonset. Every time I make a configuration change the pod (container) is deleted and a new one is created.

Basically, I would like to be able to reuse the same collection endpoint that is created without losing logs. I see the SUMO_CLOBBER option but that doesn't quite address the issue, only renaming of the collector.

Is there some file or volume that can be mounted in the container to keep track of this state across container deletions?

bin3377 commented 5 years ago

Since the in container collector cannot persistent the status and impossible to read k8s meta data, it's recommended to use fluentD plugin for K8s ingestion:

https://help.sumologic.com/07Sumo-Logic-Apps/10Containers_and_Orchestration/Kubernetes/Collect_Logs_for_Kubernetes

tpartington commented 5 years ago

Is there some file or volume that can be mounted in the container to keep track of this state across container deletions?

we've had success keeping the collector registered across container restarts by mounting/persisting the /opt/SumoCollector/config directory.

bin3377 commented 5 years ago

persistent file(s)/folder(s) under SumoCollector may cause data inconsistent (data loss or re-ingestion) between different collector instances so we don't suggest doing it and it's not supported.