pipe factorio events to kafka bb!!!
This commit is contained in:
parent
ef33698c33
commit
f9b93c013d
2 changed files with 9 additions and 2 deletions
8
modules/mod/pipe-logs-to-kafka.sh
Normal file
8
modules/mod/pipe-logs-to-kafka.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# stream logs from 'factorio' container
|
||||
# follow the logs, and
|
||||
# combine stdout and stderr
|
||||
# only match lines that start with 'FactorioEvent: ',
|
||||
# and only return the stuff *after* 'FactorioEvent: '
|
||||
docker logs --tail 0 -f factorio 2>&1 |
|
||||
sed -n -e 's/^FactorioEvent: //p' |
|
||||
kafkacat -P -b localhost -t factorio-server-log
|
||||
Loading…
Add table
Add a link
Reference in a new issue