Sabertooth is a drop in realtime logger with an interactive dashboard
2023-11-18.21-01-11.mp4
- NextJS
- ExpressJS
- Move into the backend directory and run
npm
npm install
yarn
yarn
- Add the environment variables based on the .example-env or as mentioned below
PORT=
MONGO_URI=
REDIS_HOST=
REDIS_PASS=
REDIS_PORT=
- Build the project first with
npm
npm run build
yarn
yarn build
- Run the project with
npm
npm run dev
yarn
yarn dev
- Move into the frontend directory and run
npm
npm install
yarn
yarn
- Run the project with
npm
npm run dev
yarn
yarn dev
- You can checkout the documentation and endpoints at: https://documenter.getpostman.com/view/22341383/2s9Ye8eu4T
- Checkout the deployment on:
- Frontend: https://sabertooth-seven.vercel.app/
- Backend: https://sabertooth.fly.dev/
There are three endpoints
- /ingest
- /stream
- /logs
- POST request, does two things,
- Adds the log into a BullMQ queue for later processing and insertion into the database
- Adds the data into a Redis publisher channel
- GET request, realtime, Keep-Alive connection, subscribes to the Redis channel and shows the latest data live. You can append various query parameters to filter the logs
- GET request, gets the entire log from the database. You can append various query parameters to filter the logs
Possible parameters:
- level:debug
- msg_regex:^redis$ --> Supports all regex
- trace_id:a traceid
- from_timestamp:2023-12-16T12:34 --> Must be timestamp
- to_timestamp:2023-12-16T12:34 --> Must be timestamp
- Searching on entire logfile
- Implement search within specific date ranges.
- Utilize regular expressions for search.
- Allow combining multiple filters.
- Provide real-time log ingestion and searching capabilities.
- Implement role-based access to the query interface.
- Batching entries to reduce number of db insertion calls
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md
for more information.
Your Name - @twitter_handle - [email protected]