From: Wido den Hollander Date: Tue, 12 Dec 2017 09:24:49 +0000 (+0100) Subject: mgr/zabbix: Improve logging of Zabbix module X-Git-Tag: v12.2.5~94^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ecf3028f66c9432544ebefeb997f118ca2a94eab;p=ceph.git mgr/zabbix: Improve logging of Zabbix module Just to make sure more logging can be done when needed. Signed-off-by: Wido den Hollander (cherry picked from commit 9f525b2838cf4b4cb4e58e2b3959ac3cac1522fb) --- diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py index 6088f7c30e41..4b50c1a5b705 100644 --- a/src/pybind/mgr/zabbix/module.py +++ b/src/pybind/mgr/zabbix/module.py @@ -88,6 +88,8 @@ class Module(MgrModule): def init_module_config(self): self.fsid = self.get('mon_map')['fsid'] + self.log.debug('Found Ceph fsid %s', self.fsid) + for key, default in self.config_keys.items(): self.set_config_option(key, self.get_config(key, default)) @@ -106,6 +108,8 @@ class Module(MgrModule): if option == 'interval' and value < 10: raise RuntimeError('interval should be set to at least 10 seconds') + self.log.debug('Setting in-memory config option %s to: %s', option, + value) self.config[option] = value return True @@ -217,7 +221,7 @@ class Module(MgrModule): return try: - self.log.debug( + self.log.info( 'Sending data to Zabbix server %s as host/identifier %s', self.config['zabbix_host'], identifier) self.log.debug(data) @@ -268,14 +272,11 @@ class Module(MgrModule): self.event.set() def serve(self): - self.log.debug('Zabbix module starting up') + self.log.info('Zabbix module starting up') self.run = True self.init_module_config() - for key, value in self.config.items(): - self.log.debug('%s: %s', key, value) - while self.run: self.log.debug('Waking up for new iteration')