Pipe enables you to stream logs from multiple sources to Elasticsearch.
{
"destination": {
"elasticsearch": {
"host": "http(s)://[username]:[password]@[host]:[port]/"
}
},
"sources": {
"files": {
"logs": [
{
"name": "syslog",
"path": "/var/log/system.log"
},
{
"name": "install",
"path": "/var/log/install.log"
},
{
"name": "auth",
"path": "/var/log/auth.log"
}
]
}
}
}pipe check --config my-config.jsonpipe stream --config my-config.json- Create a custom brige network to be used for running the Elasticsearch, Kibana and Pipe containers.
docker network create pipe-network --driver bridgedocker run --name elasticsearch --network pipe-network -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.11.2docker run --name kibana --network pipe-network -p 5601:5601 docker.elastic.co/kibana/kibana:7.11.2- The Elasticsearch host in the Pipe's config file should be pointing to the Elasticsearch container as such
....
"elasticsearch": {
"host": "elasticsearch:9200",
....- The log path to be streamed to Elasticsearch MUST be mounted to the same path in the container otherwise, the Pipe container cannot access the log files.
Eg: If the sample Pipe's config isthen, the path.... "files": { "logs": [ { "name": "syslog", "path": "/var/log/system.log" }, ...
/var/logshould be mounted to the Pipe's container.
docker pull kenec/pipe
docker run --name pipe --network pipe-network -i -v $(pwd):/mnt -v '<path to logs directory on host>:<path to logs directory on container>' kenec/pipe stream -c /mnt/config.json :TODO