An experimental Log database top of RocksDB
Building
nix-shell --run "sbt assembly"
Running Server
java -jar server/target/scala-2.13/server.jar --config sample-configs/primary-server.conf
Using client to push logs :
cat /var/log/nginx/access.log | java -jar cli/target/scala-2.13/logsdb-cli.jar push -h 127.0.0.1 -p 9080
## Push Json
echo '{"time": 1599063421241, "message": "Log Message", "attributes" : {"attr1": "Value1"} }' | java -jar cli/target/scala-2.13/logsdb-cli.jar push -h 127.0.0.1 -p 9080 --json
## Push log with labels
cat /var/log/nginx/access.log | java -jar cli/target/scala-2.13/logsdb-cli.jar push -h 127.0.0.1 -p 9080 --label app=web --label server=nginx
Pushing to a specific collection:
cat /var/log/nginx/access.log | java -jar cli/target/scala-2.13/logsdb-cli.jar push -h 127.0.0.1 -p 9080 -c webserver
Using client to query logs
java -jar cli/target/scala-2.13/logsdb-cli.jar query -h 127.0.0.1 -p 9080 --limit 100 --from '2020-08-22T20:20:30Z'
java -jar cli/target/scala-2.13/logsdb-cli.jar tail -h 127.0.0.1 -p 9080
java -jar cli/target/scala-2.13/logsdb-cli.jar query -h 127.0.0.1 -p 9080 -c webserver --limit 100 --from '2020-08-22T20:20:30Z'
java -jar cli/target/scala-2.13/logsdb-cli.jar tail -h 127.0.0.1 -p 9080 '{app="web"} |~ "Error.*"'
Using client to get list of collections
java -jar cli/target/scala-2.13/logsdb-cli.jar collections -h 127.0.0.1 -p 9080
- Getting collections list: http://localhost:8080/v1/collections
- Querying the logs: http://localhost:8080/v1/logs/webserverr?after=0&limit=10