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