예제 #1
0
def elasticsearch_adapter():
    config = {
        'hosts': ['localhost:9200', 'rabbitstack:9200'],
        'index': 'kernelstream',
        'document': 'threads',
    }
    return ElasticsearchOutput(**config)
예제 #2
0
def elasticsearch_bulk_adapter():
    config = {
        'hosts': ['localhost:9200', 'rabbitstack:9200'],
        'index': 'kernelstream',
        'document': 'threads',
        'bulk': True,
        'username': '******',
        'password': '******'
    }
    return ElasticsearchOutput(**config)