A real-time backend monitoring and analytics system built using Flask, SQLite, Pandas, and Matplotlib.
This project simulates a lightweight observability platform capable of:
- collecting API logs
- monitoring system health
- analyzing backend performance
- generating live analytics
- visualizing traffic trends
Insert API logs dynamically using:
- dashboard form
- REST API
- automated traffic simulator
Interactive dashboard displaying:
- total logs
- success rate
- failure rate
- system health
- recent logs
- AI-like insights
Automatically generates:
- random API traffic
- failures
- latency spikes
- varying severities
to simulate real production systems.
Built using Pandas for:
- API usage analysis
- average response time calculation
- failure tracking
- slowest API detection
- health scoring
The system intelligently detects:
- high failure rates
- latency spikes
- unstable APIs
- high traffic conditions
Example:
β High failure rate detected
β Payments API is unstable
β System latency is critical
Generates real-time charts using Matplotlib:
- Pie Chart β Success vs Failure
- Bar Chart β API Usage Frequency
- Line Chart β Response Time Trends
Download complete analytics reports as CSV files.
| Technology | Purpose |
|---|---|
| Python | Core backend |
| Flask | REST API framework |
| SQLite | Database |
| Pandas | Data analysis |
| Matplotlib | Data visualization |
log-analytics-system/
β
βββ app.py
βββ database.py
βββ models.py
βββ traffic_simulator.py
βββ requirements.txt
β
βββ routes/
β βββ logs.py
β
βββ services/
β βββ analytics.py
β
βββ utils/
β βββ charts.py
β
βββ templates/
β βββ dashboard.html
β
βββ static/
β βββ charts/
β
βββ logs.db
git clone https://github.com/YOUR_USERNAME/smart-log-analytics-system.gitcd smart-log-analytics-systempip install -r requirements.txtpython app.pyhttp://127.0.0.1:5000
| Method | Endpoint | Description |
|---|---|---|
| POST | /log |
Insert logs |
| GET | /logs |
Fetch all logs |
| GET | /analytics |
Generate analytics |
| GET | /charts |
Generate charts |
| GET | /simulate |
Generate fake traffic |
| GET | /export/csv |
Download CSV report |
{
"api_name": "/payments",
"status": "failure",
"severity": "CRITICAL",
"response_time": 842
}The system computes:
- total logs
- success percentage
- failure percentage
- average response time
- most used API
- slowest API
- most failing API
- health status
Dashboard updates automatically every few seconds.
Charts dynamically regenerate based on incoming logs.
System generates human-readable insights based on analytics.
β High failure rate detected
β Payments API is unstable
β System latency is critical
β System performance is stable
This project was built to understand how real-world monitoring and observability platforms work internally.
It simulates concepts used in production systems such as:
- observability
- performance monitoring
- API analytics
- backend health tracking
- traffic analysis
- Interactive charts using Chart.js
- Real-time WebSocket monitoring
- Alert notification system
- Machine learning anomaly detection
- PostgreSQL support
- Docker deployment
- User authentication
This project evolved from a simple logging system into a mini real-time observability platform capable of:
β
collecting logs
β
analyzing system performance
β
generating insights
β
visualizing backend health
β
simulating live production traffic
β
monitoring API behavior in real-time
Deepa M
AI/ML Developer Aspirant Passionate about building intelligent real-world applications using Machine Learning and Full Stack Development.