LogMk is a lightweight log monitoring solution for Kubernetes environments. It monitors pod logs, saves them in a central MySQL database, and provides a web portal for viewing and filtering log activity. Designed for simplicity, LogMk may not be robust enough for large enterprise-scale environments but is perfect for smaller setups or development environments.
- Real-Time Log Monitoring: View logs in real-time using the web portal.
- Centralized Storage: All logs are stored in a MySQL database.
- Filter and Search: Easily filter and search logs to find specific entries.
- Simple Deployment: Deploy a .NET 8 worker agent on all Kubernetes nodes to start collecting logs.
LogMk consists of three main components:
- .NET 8 Worker Agent
Deployed on all Kubernetes nodes. Collects pod logs and sends them to the central API.
- Angular 18 Web Portal
Provides a user-friendly interface for viewing and filtering logs. Utilizes SignalR for real-time log updates.
- .NET 8 API
- Receives log data from the worker agents.
- Exposes endpoints for the web portal to access log data.
- Implements SignalR for real-time communication with the web portal.
- Kubernetes Cluster
- .NET 8 SDK (for building)
- MySQL Database
- Angular CLI (for web portal development)
- Deploy Worker Agent
Build and deploy the .NET 8 worker agent on all Kubernetes nodes.
# Example command to build the worker agent
dotnet build src/LogMkWorkerAgent
# Example command to deploy the agent
kubectl apply -f deployment.yaml
- Set Up MySQL Database
Create a MySQL database to store the logs. Update the connection string in the API configuration.
- Deploy API
Build and deploy the .NET 8 API.
dotnet build src/LogMkApi
dotnet publish src/LogMkApi -o /publish
- Set Up Web Portal
Navigate to the web portal directory and install dependencies.
cd src/LogMkWebPortal
npm install
Build and serve the web portal.
ng build --prod
ng serve
Access the web portal via your browser. Use the filter and search functionalities to find specific logs. Monitor logs in real-time through the SignalR integration.
Contributions are welcome! Please fork the repository and submit a pull request.
MIT License
The .NET and Angular communities for their excellent frameworks.