A High-Performance, Scalable Observability & Monitoring Platform
Selimetry is a modern, centralized logging and metrics aggregation system designed to provide real-time insights into your application's health and performance. Built with a microservices architecture, it seamlessly ingests logs, calculates metrics on the fly, and visualizes data for actionable intelligence.
- ⚡ High-Throughput Ingestion: A Go-based ingestor service capable of handling high volumes of log data via REST API.
- 📊 Automated Metrics Aggregation: Background services automatically calculate key metrics like Request Count, Error Rate, and Response Times.
- 📉 Smart Storage: Optimizes database usage by only storing metrics when significant changes occur.
- 🔍 Flexible Querying: Powerful API to filter logs by service, level, environment, and time range.
- 📈 Visualization Ready: Pre-configured integration with Grafana for beautiful, real-time dashboards.
- 🐳 Dockerized: Fully containerized setup for easy deployment and scaling.
The Go-based Ingestor is optimized for high throughput. Below are the benchmark results for processing 50,000 requests under different batching configurations:
| Batch Size | Total Time | Avg Latency | Requests/sec |
|---|---|---|---|
| No Batching | 3.2056s | 3.2ms | 15,597 |
| 50 | 4.3019s | 4.2ms | 11,622 |
| 1,000 | 2.4674s | 2.4ms | 20,264 |
| 5,000 | 2.4065s | 2.4ms | 20,777 |
Note: Tests were conducted on a local environment. Batching significantly improves throughput, peaking at over 20,000 requests per second with larger batch sizes.
- Ingestion Layer: Go (Golang) - Chosen for its raw performance and concurrency.
- Processing Layer: ASP.NET Core 8.0 - Robust, type-safe backend for complex aggregation logic.
- Message Broker: Apache Kafka - Ensures reliable, asynchronous data streaming.
- Database: PostgreSQL 16 - Reliable relational storage for logs and time-series metric data.
- Visualization: Grafana - Industry-standard tool for monitoring dashboards.
- Infrastructure: Docker & Docker Compose.
-
Clone the repository:
git clone https://github.com/abdallahsellem/Selimetry.git cd Selimetry -
Start the services:
docker-compose up -d
-
Access the services:
- Backend API (Swagger):
http://localhost:8080/swagger - Ingestor API:
http://localhost:8081 - Grafana:
http://localhost:3000(Default login:admin/admin)
- Backend API (Swagger):
- Port:
8081 - Role: The entry point for all log data. It validates incoming requests and rapidly produces them to a Kafka topic.
- Key Tech: Go, Sarama (Kafka Client).
- Port:
8080 - Role: Consumes messages from Kafka, persists them to the database, and runs background jobs to aggregate data into useful metrics.
- Key Tech: .NET 8, Entity Framework Core, Hosted Services.
Selimetry/
├── SelimetryServices/
│ ├── SelimetryConsumer/ # .NET 8 Backend Service (Consumer & Aggregator)
│ └── SelimetryIngestor/ # Go High-Throughput Ingestor Service
├── infrastructure/ # Infrastructure configurations (Terraform - Coming Soon)
├── docker-compose.yml # Container orchestration
└── README.md # Project documentation
The entire platform is configured via docker-compose.yml. Key environment variables include:
- Database Credentials: Configured in the
dbservice and consumed bybackend. - Kafka Brokers: Configured in
kafkaand used by bothingestorandbackend.
To modify database passwords or ports, update the .env file (if present) or directly edit docker-compose.yml.
Selimetry automatically aggregates logs to calculate the following real-time metrics for each service:
| Metric Name | Description |
|---|---|
| Request Count | Total volume of requests processed by the service. |
| Error Rate | The percentage of logs marked as Error or Critical. |
| Exception Rate | The frequency of unhandled exceptions logged by the service. |
| Logs Per Minute | A throughput metric indicating the rate of incoming log entries. |
| Activity By Hour | Analyzes usage patterns to show activity distribution throughout the day. |
| Health Score | A composite score (0-100) indicating the overall health of the service based on errors and latency. |
Once the services are running, you can explore the full API specification for the Consumer service via Swagger UI:
curl -X POST http://localhost:8081/ingest \
-H "Content-Type: application/json" \
-d '[{
"serviceName": "PaymentService",
"level": "Error",
"message": "Transaction failed",
"timestamp": "2024-12-10T10:00:00Z",
"environment": "Production"
}]'Contributions are welcome! Please feel free to submit a Pull Request.
-
Infrastructure as Code: Implement Terraform scripts for provisioning cloud resources (AWS/Azure) in the
infrastructure/folder. -
CI/CD Pipeline: Set up GitHub Actions for automated testing and deployment.
-
Enhanced Visualization: Add more granular Grafana dashboards for specific service metrics.
-
Alerting: Configure Prometheus Alertmanager for critical system events.
This project is proprietary software.
