Browse Source

graphite output: allow specification of whitelist

Helge Jung 8 years ago
parent
commit
c6444f463c
2 changed files with 7 additions and 3 deletions
  1. 4 0
      batcave.py
  2. 3 3
      ffstatus/graphite.py

+ 4 - 0
batcave.py

@@ -47,6 +47,8 @@ def get_args():
                         help='Graphite port')
     parser.add_argument('--dashing-url',
                         help='Dashing URL')
+    parser.add_argument('--graphite-whitelist',
+                        help='comma-separated list of node-ids to send to Graphite only')
     parser.add_argument('--dashing-token',
                         help='Dashing\'s secret update token')
     parser.add_argument('--api-bind-host', default='',
@@ -116,6 +118,8 @@ def main():
     graphite = None
     if args.graphite_host is not None:
         graphite = GraphitePush(args.graphite_host, args.graphite_port)
+        if args.graphite_whitelist is not None:
+            graphite.whitelist = args.graphite_whitelist.split(',')
 
     if args.no_send:
         if graphite is not None:

+ 3 - 3
ffstatus/graphite.py

@@ -42,9 +42,9 @@ class GraphitePush:
 
         for nodeid in data:
             if whitelist is not None and nodeid not in whitelist:
-                logging.debug(
-                    'Skipping node \'%s\' (it is not in the whitelist).',
-                    nodeid)
+                #logging.debug(
+                #    'Graphite output skips node \'%s\' (not in whitelist).',
+                #    nodeid)
                 continue
 
             nodeinfo = data[nodeid]