segfault/tools/logpipe
user e66a2806f2
fix: logpipe socket permission
Signed-off-by: user <you@example.com>
2023-11-22 14:18:45 +00:00
..
client minor 2023-11-22 14:18:45 +00:00
sock lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
config.yaml lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
docker-compose.yml lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
Dockerfile lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
go.mod lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
go.sum lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
main.go fix: logpipe socket permission 2023-11-22 14:18:45 +00:00
Makefile logpipe 2023-11-22 14:18:45 +00:00
metrics.go lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00
README.md lopipe: elasticsearch logging 2023-11-22 14:18:45 +00:00

LogPipe

Accept logs via cmdline and ship them to elasticsearch

Building

  • go build -o bin/logpipe or via docker
  • docker build -t sf-logpipe .
  • docker-compose up -d

Adding a log entry

  • Start the program - ./bin/logpipe (ignore if using docker)
  • Then run echo "Myattribute:MyValue|Myattribute2:MyValue2|" | nc -U ./logPipe.sock or
  • echo "Myattribute:MyValue|Myattribute2:MyValue2|" | uniz-socket-client

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