def __init__(self, argv=(), env=None, debug=False):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)
        
        """
        MuninPlugin.__init__(self, argv, env, debug)

        self._fshost = self.envGet('fshost')
        self._fsport = self.envGet('fsport', None, int)
        self._fspass = self.envGet('fspass')
        self._category = 'FreeSwitch'

        if self.graphEnabled('fs_calls'):
            graph = MuninGraph('FreeSWITCH - Active Calls', self._category,
                info = 'FreeSWITCH - Number of Active Calls.',
                args = '--base 1000 --lower-limit 0')
            graph.addField('calls', 'calls', type='GAUGE',
                draw='LINE2',info='Active Calls')
            self.appendGraph('fs_calls', graph)

        if self.graphEnabled('fs_channels'):
            graph = MuninGraph('FreeSWITCH - Active Channels', 'FreeSWITCH',
                info = 'FreeSWITCH - Number of Active Channels.',
                args = '--base 1000 --lower-limit 0')
            graph.addField('channels', 'channels', type='GAUGE',
                           draw='LINE2')
            self.appendGraph('fs_channels', graph)
def __init__ ( self , argv = ( ) , env = None , debug = False ) : MuninPlugin . __init__ ( self , argv , env , debug ) self . _fshost = self . envGet ( 'fshost' ) self . _fsport = self . envGet ( 'fsport' , None , int ) self . _fspass = self . envGet ( 'fspass' ) self . _category = 'FreeSwitch' if self . graphEnabled ( 'fs_calls' ) : graph = MuninGraph ( 'FreeSWITCH - Active Calls' , self . _category , info = 'FreeSWITCH - Number of Active Calls.' , args = '--base 1000 --lower-limit 0' ) graph . addField ( 'calls' , 'calls' , type = 'GAUGE' , draw = 'LINE2' , info = 'Active Calls' ) self . appendGraph ( 'fs_calls' , graph ) if self . graphEnabled ( 'fs_channels' ) : graph = MuninGraph ( 'FreeSWITCH - Active Channels' , 'FreeSWITCH' , info = 'FreeSWITCH - Number of Active Channels.' , args = '--base 1000 --lower-limit 0' ) graph . addField ( 'channels' , 'channels' , type = 'GAUGE' , draw = 'LINE2' ) self . appendGraph ( 'fs_channels' , graph )
Populate Munin Plugin with MuninGraph instances.
        
        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)