]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/zabbix: Improve logging of Zabbix module
authorWido den Hollander <wido@42on.com>
Tue, 12 Dec 2017 09:24:49 +0000 (10:24 +0100)
committerWido den Hollander <wido@42on.com>
Wed, 7 Mar 2018 14:31:29 +0000 (15:31 +0100)
Just to make sure more logging can be done when needed.

Signed-off-by: Wido den Hollander <wido@42on.com>
(cherry picked from commit 9f525b2838cf4b4cb4e58e2b3959ac3cac1522fb)

src/pybind/mgr/zabbix/module.py

index 6088f7c30e415bbab2408c4675eeb6d79ee69aa2..4b50c1a5b70551b0e42983a0ffe00452f0e07a13 100644 (file)
@@ -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')