Accept logs via cmdline and ship them to elasticsearch
go build -o bin/logpipeor via dockerdocker build -t sf-logpipe .docker-compose up -d
- Start the program -
./bin/logpipe(ignore if using docker) - Then run
echo "Myattribute:MyValue|Myattribute2:MyValue2|" | nc -U ./logPipe.sock
Notes:
- Log format is "attr:val|", each attribute-value pair must be terminated with a pipe(|)
- Timestamp is automatically added to log entries
- Elasticsearch credentials must be configured in
config.yaml - Program/Container must be restarted after config changes