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

        config.update({
        })

        return config
815869
def get_default_config(self):
        
        config = super(PostgresqlCollector, self).get_default_config()
        config.update({
            'path': 'postgres',
            'host': 'localhost',
            'dbname': 'postgres',
            'user': 'postgres',
            'password': 'postgres',
            'port': 5432,
            'password_provider': 'password',
            'sslmode': 'disable',
            'underscore': False,
            'extended': False,
            'metrics': [],
            'pg_version': 9.2,
            'has_admin': True,
        })
        return config
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
1147809
def get_default_config(self):
        
        config = super(PostfixCollector, self).get_default_config()
        config.update({
            'path':             'postfix',
            'host':             'localhost',
            'port':             7777,
            'include_clients':  True,
        })
        return config
875534
def get_default_config(self):
        
        config = super(OpenVPNCollector, self).get_default_config()
        config.update({
            'path':      'openvpn',
            'instances': 'file:///var/log/openvpn/status.log',
            'timeout':   '10',
        })
        return config
1192813
def get_default_config_help(self):
        
        config = super(SentryHandler, self).get_default_config_help()

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

        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
498572
def get_default_config(self):
        
        config = super(SentryHandler, self).get_default_config()

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

        return config
186957
def configure(self, cfg, handler, path=""):

        

        # configure simple value attributes (str, int etc.)
        for name, attr in handler.attributes():
            if cfg.get(name) is not None:
                continue
            if attr.expected_type not in [list, dict]:
                cfg[name] = self.set(handler, attr, name, path, cfg)
            elif attr.default is None and not hasattr(handler, "configure_%s" % name):
                self.action_required.append(("%s.%s: %s" % (path, name, attr.help_text)).strip("."))

        # configure attributes that have complex handlers defined
        # on the config Handler class (class methods prefixed by
        # configure_ prefix
        for name, attr in handler.attributes():
            if cfg.get(name) is not None:
                continue
            if hasattr(handler, "configure_%s" % name):
                fn = getattr(handler, "configure_%s" % name)
                fn(self, cfg, "%s.%s"% (path, name))
                if attr.expected_type in [list, dict] and not cfg.get(name):
                    try:
                        del cfg[name]
                    except KeyError:
                        pass
951320
def get_default_config_help(self):
        
        config = super(HostedGraphiteHandler, self).get_default_config_help()

        config.update({
            'apikey': 'Api key to use',
            'host': 'Hostname',
            'port': 'Port',
            'proto': 'udp or tcp',
            'timeout': '',
            'batch': 'How many to store before sending to the graphite server',
            'max_backlog_multiplier': 'how many batches to store before trimming',  # NOQA
            'trim_backlog_multiplier': 'Trim down how many batches',
        })

        return config
153465
def get_default_config(self):
        
        config = super(NetscalerSNMPCollector, self).get_default_config()
        config.update({
            'path':     'netscaler',
            'timeout':  15,
            'exclude_service_type': [],
            'exclude_vserver_type': [],
            'exclude_service_state': [],
            'exclude_vserver_state': []
        })
        return config
575221
def get_default_config(self):
        
        default_config = super(SNMPRawCollector,
                               self).get_default_config()
        default_config.update({
            'oids': {},
            'path_prefix': 'servers',
            'path_suffix': 'snmp',
        })
        return default_config
1086251
def get_default_config(self):
        
        config = super(MySQLHandler, self).get_default_config()

        config.update({
        })

        return config
1204638
def get_default_config(self):
        
        config = super(MultiGraphitePickleHandler, self).get_default_config()

        config.update({
            'host': ['localhost'],
            'port': 2003,
            'proto': 'tcp',
            'timeout': 15,
            'batch': 1,
            'max_backlog_multiplier': 5,
            'trim_backlog_multiplier': 4,
        })

        return config
23351
def get_default_config(self):
        
        config = super(ArchiveHandler, self).get_default_config()

        config.update({
            'log_file': '',
            'when': 'midnight',
            'days': 7,
            'rollover_interval': 1,
            'encoding': None,
            'propagate': False,
        })

        return config
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
975450
def get_default_config_help(self):
        
        config = super(MySQLHandler, self).get_default_config_help()

        config.update({
        })

        return config