Public | Automated Build

Last pushed: a year ago
Short Description
small Go program that takes logs from Logstash via zmq transport and out it as http endpoint
Full Description

logstash-zconsole

small Go program that Docker container logs from Logstash via zmq transport and out it as http endpoint.
Primary for debugging/development environments based on ELK stack.

Logstash config

input {
    gelf {
                port => 12200
            host => "0.0.0.0"
            codec => json
            type => "docker_logs"
    }
}
output {
    zeromq {
             topology => "pubsub"
                address => ["tcp://*:12300"]
                mode => "server"
                codec => "json"
    }
}

Configure Docker for Logstash GELF logging, adding this line to docker daemon option

# dockerd --log-driver=gelf --log-opt gelf-address=udp://<logstash_ip>:12200

or by adding line to docker run

# docker run --log-driver=gelf --log-opt gelf-address=udp://<logstash_ip>:12200 <image>

Run zconsole

# docker run --rm -p 8080:8080 -it -e LOGSTASH_ADDR=tcp://<logstash_ip>:12300 ybalt/logstash-zconsole

change LOGSTASH_ADDR to Logstash zmq pub endpoint, IP should be visible from this container.

Connect:

# curl 127.0.0.1:8080
Docker Pull Command
Owner
ybalt
Source Repository