pblittle / docker-logstash

Docker image for Logstash 1.4
https://hub.docker.com/r/pblittle/docker-logstash
MIT License
236 stars 90 forks source link

trying to mount volumes from the filesystem for running into logstash #27

Closed cultofmetatron closed 10 years ago

cultofmetatron commented 10 years ago

hi, I'm currently trying to mount a volume from the host system in the dockerfile.

I'm running it like such

docker run -e LOGSTASH_CONFIG_URL=https://gist.githubusercontent.com/cultofmetatron/7e0a82f97c2887fc930e/raw/1bebdf0921683b4624c79f1c42fa7b67082d1678/logstash.conf --name logstash --link elasticsearch:es  -d -p 8081:9292 -p 9200:9200 -v /keychain/postgresql/log:/var/log/postgresql cultofmetatron/docker-logstash

Then I also modified the config file to point to this gist https://gist.githubusercontent.com/cultofmetatron/7e0a82f97c2887fc930e/raw/1bebdf0921683b4624c79f1c42fa7b67082d1678/logstash.conf

input {
  stdin {
    type => "stdin-type"
  }

  file {
    type => "syslog"
    path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog"]
    start_position => "beginning"
  }

  file {
    type => "postgresql"
    path => ["/var/log/postgresql/*.log" ]
    start_position => "beginning"
  }
}

output {
  stdout { 
    codec => rubydebug
  }

  elasticsearch {
    bind_host => "ES_HOST"
    port => "ES_PORT"
  }

}

Currently I'm then echoing to the test.log in /var/log/postgresql/ and logstash is not picking up on it. Is there somethign I'm missing?

pblittle commented 10 years ago

@cultofmetatron, thanks for using my image. A few quick questions to help debug ...

pblittle commented 10 years ago

Closing due to inactivity. Please reopen this issue if the problem persists.