Exemplo n.º 1
0
 def config(self, cfg):
     """Initializes variables from conf files."""
     for children in cfg.children:
         if children.key == INTERVAL:
             self.interval = children.values[0]
         if children.key == PROCESS:
             self.process = children.values[0]
             #get jolokia instance
             self.jclient = JolokiaClient(os.path.basename(__file__)[:-3], self.process)
 def __init__(self):
     """Initializes interval and previous dictionary variable."""
     self.process = 'zookeeper'
     self.interval = DEFAULT_INTERVAL
     self.listenerip = 'localhost'
     self.port = None
     self.prev_data = {}
     self.documentsTypes = []
     self.jclient = JolokiaClient(
         os.path.basename(__file__)[:-3], self.process)