diff --git a/dockerplugin.py b/dockerplugin.py index 9831e7e..3f1dc52 100755 --- a/dockerplugin.py +++ b/dockerplugin.py @@ -620,6 +620,10 @@ def read_callback(self): '{container}: {msg}') .format(container=_c(container), msg=e)) + def stop_all(self): + for stat_thread in self.stats.values(): + stat_thread.stop = True + class CollectdLogHandler(logging.Handler): """Log handler to forward statements to collectd @@ -705,6 +709,8 @@ def shutdown(): log.info("dockerplugin shutting down") log.removeHandler(handle) + plugin.stop_all() + # Set up logging logging.setLoggerClass(CollectdLogger)