Return the default config for the handler
554996
def get_default_config(self):
        
        config = super(GraphiteHandler, self).get_default_config()

        config.update({
            'host': 'localhost',
            'port': 2003,
            'proto': 'tcp',
            'timeout': 15,
            'batch': 1,
            'max_backlog_multiplier': 5,
            'trim_backlog_multiplier': 4,
            'keepalive': 0,
            'keepaliveinterval': 10,
            'flow_info': 0,
            'scope_id': 0,
            'reconnect_interval': 0,
        })

        return config
659745
def get_default_config(self):
        
        config = super(BindCollector, self).get_default_config()
        config.update({
            'host': 'localhost',
            'port': 8080,
            'path': 'bind',
            # Available stats:
            # - resolver (Per-view resolver and cache statistics)
            # - server (Incoming requests and their answers)
            # - zonemgmt (Requests/responses related to zone management)
            # - sockets (Socket statistics)
            # - memory (Global memory usage)
            'publish': [
                'resolver',
                'server',
                'zonemgmt',
                'sockets',
                'memory',
            ],
            # By default we don't publish these special views
            'publish_view_bind': False,
            'publish_view_meta': False,
        })
        return config
1194541
async def set_config(cls, name: str, value):
        
        return await cls._handler.set_config(name=[name], value=[value])
760911
def get_default_config(self):
        
        config = super(SignalfxHandler, self).get_default_config()

        config.update({
            'url': 'https://ingest.signalfx.com/v2/datapoint',
            'batch': 300,
            'filter_metrics_regex': '',
            # Don't wait more than 30 sec between pushes
            'batch_max_interval': 30,
            'auth_token': '',
        })

        return config
1038769
def ensure_configured(func):
    """"""
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        if len(logging.root.handlers) == 0:
            basicConfig()
        return func(*args, **kwargs)
    return wrapper
1083550
def get_handler(handler_name):
    

    from .conf import options
    
    handlers = options.handlers
    
    for handler in handlers:
        handler_path = handler.split(".")
        name = handler_path[-2]
        
        if handler_name == name:
            handler_module = __import__(".".join(handler_path[:-1]), {}, {}, str(handler_path[-1]))
            
            return getattr(handler_module, handler_path[-1])()
    
    return None
714655
def get_default_config(self):
        
        config = super(GmetricHandler, self).get_default_config()

        config.update({
            'host': 'localhost',
            'port': 8651,
            'protocol': 'udp',
        })

        return config
217278
def get_default_config(self):
        
        config = super(SoftInterruptCollector, self).get_default_config()
        config.update({
            'path':     'softirq'
        })
        return config
975450
def get_default_config_help(self):
        
        config = super(MySQLHandler, self).get_default_config_help()

        config.update({
        })

        return config
315249
def __load_configuration(self):
        
        handler_to_enable = filter(lambda h: h.keys is not None, handlers)
        for handler in handler_to_enable:
            if handler.name in self.kwargs:
                for k in handler.keys:
                    self.kwargs.update({k: True})

        self.config = self.configuration_class(self.app.config, **self.kwargs)
1005408
def get_default_config(self):
        
        config = super(UserScriptsCollector, self).get_default_config()
        config.update({
            'path':         '.',
            'scripts_path': '/etc/diamond/user_scripts/',
            'floatprecision': 4,
        })
        return config
693888
def get_default_config(self):
        
        config = super(SlonyCollector, self).get_default_config()
        config.update({
            'path': 'postgres',
            'host': 'localhost',
            'user': 'postgres',
            'password': 'postgres',
            'port': 5432,
            'slony_node_string': 'Node [0-9]+ - postgres@localhost',
            'method': 'Threaded',
            'instances': {},
        })
        return config
740986
def get_default_config(self):
        
        config = super(IPMISensorCollector, self).get_default_config()
        config.update({
            'bin':              '/usr/bin/ipmitool',
            'use_sudo':         False,
            'sudo_cmd':         '/usr/bin/sudo',
            'path':             'ipmi.sensors',
            'thresholds':       False,
            'delimiter':        '.'
        })
        return config
690728
def get_default_config(self):
        
        config = super(KVMCollector, self).get_default_config()
        config.update({
            'path': 'kvm',
        })
        return config
745236
def get_default_config(self):
        
        config = super(NetstatCollector, self).get_default_config()
        config.update({
            'path':         'netstat',
        })
        return config
1258159
def get_default_config(self):
        
        config = super(ChronydCollector, self).get_default_config()
        config.update({
            'path':             'chrony',
            'bin':              '/usr/bin/chronyc',
            'use_sudo':         False,
            'sudo_cmd':         '/usr/bin/sudo',
        })
        return config
498572
def get_default_config(self):
        
        config = super(SentryHandler, self).get_default_config()

        config.update({
            'dsn': '',
        })

        return config