(self, config=None)
Create a new instance of the GmetricHandler class
Create a new instance of the GmetricHandler class
Create a new instance of the GmetricHandler class
def __init__(self, config=None):
        """
        Create a new instance of the GmetricHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)

        if gmetric is None:
            logging.error("Failed to load gmetric module")
            return

        # Initialize Data
        self.socket = None

        # Initialize Options
        self.host = self.config['host']
        self.port = int(self.config['port'])
        self.protocol = self.config['protocol']
        if not self.protocol:
            self.protocol = 'udp'

        # Initialize
        self.gmetric = gmetric.Gmetric(self.host, self.port, self.protocol)
def __init__ ( self , config = None ) : # Initialize Handler Handler . __init__ ( self , config ) if gmetric is None : logging . error ( "Failed to load gmetric module" ) return # Initialize Data self . socket = None # Initialize Options self . host = self . config [ 'host' ] self . port = int ( self . config [ 'port' ] ) self . protocol = self . config [ 'protocol' ] if not self . protocol : self . protocol = 'udp' # Initialize self . gmetric = gmetric . Gmetric ( self . host , self . port , self . protocol )