A lightweight Security Information and Event Management (SIEM) platform built with Python, FastAPI, SQLite, Prometheus, and Grafana.
- Real-time Linux auth.log monitoring
- Security event parsing
- SQLite event storage
- Duplicate event detection using SHA-256 hashes
- Severity classification
- REST API
- Prometheus metrics
- Grafana dashboards
- Brute-force attack detection
- Sudo command auditing
- Authentication failure detection
Linux auth.log
↓
Log Parser
↓
SQLite Database
↓
Alert Engine
↓
FastAPI REST API
↓
Prometheus
↓
Grafana Dashboard
| Event Type | Severity |
|---|---|
| SUDO_COMMAND | LOW |
| SUDO_AUTH_FAILURE | MEDIUM |
| FAILED_SSH_LOGIN | HIGH |
| BRUTE_FORCE_ATTEMPT | CRITICAL |
- Total Security Events
- Failed SSH Logins
- Brute Force Alerts
- Sudo Commands
- Sudo Authentication Failures
GET /eventsGET /statsGET /alertsGET /top-ipsGET /metricsClone the repository:
git clone https://github.com/YOUR_USERNAME/siem-lite.git
cd siem-liteCreate a virtual environment:
python3 -m venv venv
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtInitialize the database:
python3 -m app.init_dbImport historical logs:
python3 -m app.main --file /var/log/auth.logRun the API:
python3 -m uvicorn app.api:app --reload --host 0.0.0.0 --port 8002Run the real-time monitor:
python3 -m app.realtime_monitorThe dashboard provides real-time visibility into:
- Security events
- Failed authentication attempts
- Sudo activity
- Brute-force attack indicators
Add a screenshot:
screenshots/dashboard.png
- Dockerized deployment
- Email alerts
- Slack notifications
- Geo-IP enrichment
- User activity tracking
- Threat intelligence feeds
- Multiple log sources
- Python
- FastAPI
- SQLite
- SQLAlchemy
- Prometheus
- Grafana
- Linux
- Docker (planned)
Sander Meijer