1

I'm trying to deploy an ELK stack with docker-py on a VirtualBox VM running Ubuntu 14.04. Currently running docker version 1.7 and am using the Docker Hub library official containers for elasticsearch, kibana, and logstash.

I have written a short script to pull, configure, and start the containers. The elasticsearch and kibana containers are running successfully, but the logstash container is exiting after about 23 seconds.

my logstash.start.py:

from docker import Client

import docker
import simplejson as json
import os

c = Client()

##### LOGSTASH #####
### configure container 
logstash = c.create_container(
    image = 'logstash:latest',
    name = 'logstash',
    volumes = ['/home/ops/projects/dockerfiles/scripts/elk/conf-dir', '/data/csv'],
    ports = [25826],
    host_config = docker.utils.create_host_config(
        binds={
            '/home/projects/dockerfiles/scripts/elk/conf-dir': {
                'bind': '/conf-dir',
                'ro': True
                },
            '/home/ops/csv': {
                'bind': '/data/csv',
                'ro': True
                }
            },
        links={
            'elasticsearch': 'elasticsearch',
            },
        port_bindings={
            25826: 25826
            }
        )
)
### start container
c.start(logstash)

Any suggestions?

onizo
  • 11
  • 3
  • Is there anything in the logs? – Adrian Mouat Jul 06 '15 at 10:37
  • Hi can You show configuration for kibana and elasticsearch ? I think You can try to change out port for different and also change that at logstash conf file. You can also try to run ELK with basic settings for logstash and check if that works – Dave Kraczo Jul 06 '16 at 13:29

0 Answers0