SentryLog: Real-time, AI-driven Docker log monitoring.
957
SentryLog is a Python-based application that taps directly into the logs of running Docker containers without requiring any modifications to the containers themselves. It's a real-time log monitoring tool designed to assist developers by reducing the effort needed to monitor logs and detect patterns that might otherwise go unnoticed.
The application leverages the latest advances in AI, with a connector currently implemented for Anthropic's Claude model. This AI-powered analysis provides an additional layer of insight into your container activities.
The results of the AI analysis are logged to Slack, providing an easily accessible and real-time overview of what happens in your deployment. SentryLog is not intended to replace developers monitoring logs but rather to serve as a helpful tool that enhances the efficiency and effectiveness of log monitoring.
SentryLog is in its early stages and currently monitors Nginx logs. Contributions to expand its capabilities are welcome.
Setup the following environment variables:
ANTHROPIC_API_KEY: Your Anthropic ClaudeANTHROPIC_MODEL_ID: The model you want to use for AI analysis (optional default: claude-3-haiku-20240307)SLACK_TOKEN: Your Slack tokenSLACK_CHANNEL: The Slack channel where you want to log the results**Clone from git and run directly **
Clone this repository to your local machine:
git clone [email protected]:GrgrLmml/sentrylog.git
cd sentrylog
pip install -r requirements.txt
python src/sentry.py
Pull from Docker Hub The image is available on Docker Hub, so you can pull it directly:
docker pull grgrlmml/sentrylog:latest
Add the service to your docker-compose.yml
Add SentryLog to your existing docker-compose.yml file:
version: '3.8'
services:
sentrylog:
image: grgrlmml/sentrylog:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- ANTHROPIC_API_KEY=your-anthropic-api-key
- SLACK_TOKEN=your-slack-token
- SLACK_CHANNEL=your-slack-channel
restart: always
Once SentryLog is running, it will start monitoring the logs. The AI analysis results will be logged to the specified Slack channel.
Contributions to this project are welcome. Please ensure to follow best practices and provide tests for new features.
Content type
Image
Digest
sha256:c80e23661…
Size
106.7 MB
Last updated
over 2 years ago
docker pull grgrlmml/sentrylog