LogMk is a lightweight log monitoring solution for Kubernetes environments. It consists of three main components that work together to collect, store, and visualize pod logs in real-time. Designed for simplicity and ease of deployment, LogMk is perfect for smaller setups, development environments, and teams that need straightforward log monitoring without enterprise complexity.

- Real-time Log Streaming: Live log monitoring with SignalR WebSocket integration
- Centralized Storage: MySQL database with configurable retention policies (default 30 days)
- Advanced Filtering: Multi-dimensional filtering by pod, log level, time ranges, and full-text search
- Interactive Chart Selection: Click and drag on charts to select custom time ranges
- Export Capabilities: Export filtered logs to CSV or JSON with intelligent naming
- Modern Dark Theme: Dracula-inspired color scheme optimized for extended viewing
- Mobile Responsive: Full mobile and tablet support with adaptive layouts
- Keyboard Shortcuts: Power user navigation (Ctrl+F for search, E for errors, W for warnings)
- Context Menus: Right-click actions for filtering and copying log entries
- View Modes: Toggle between compact (dense) and expanded (spacious) layouts
- Syntax Highlighting: Comprehensive highlighting for JSON, URLs, IPs, stack traces, HTTP codes
- Filter Presets: Save and manage filter combinations for quick reuse
- Copy Functionality: One-click log copying with visual feedback
- Error Count Badge: Real-time error counter in navigation with click-to-filter
- Timestamp Formats: Toggle between relative ("5 min ago") and absolute timestamps
- Virtual Scrolling: Handle thousands of logs with smooth performance
- Memory Management: Automatic cleanup and efficient DOM recycling
- WCAG Compliance: Accessible design with proper contrast ratios and keyboard navigation
- Progressive Enhancement: Graceful degradation for older browsers


LogMk consists of three main components:
- Purpose: Log collector deployed on every Kubernetes node
- Technology: .NET 9 background service
- Function: Monitors
/var/log/pods
directory and streams logs to the API - Features: Batch processing, file watching, configurable log paths
- Purpose: REST API server and SignalR hub
- Technology: .NET 9 with ServiceStack.OrmLite and SignalR
- Function: Receives logs from agents, stores in MySQL, broadcasts to web clients
- Features: JWT authentication, automatic schema migration, log retention management
- Purpose: Advanced user interface for log monitoring and analysis
- Technology: Angular 20 with TypeScript, modern signal-based architecture
- Function: Real-time log visualization with comprehensive filtering and analysis tools
- Features:
- Dracula dark theme with comprehensive syntax highlighting
- Mobile-responsive design with adaptive layouts
- Real-time SignalR integration with error count badges
- Advanced filtering with presets and interactive chart selection
- Export capabilities (CSV/JSON) with intelligent naming
- Keyboard shortcuts and accessibility features
- Context menus and copy functionality
- Compact/expanded view modes for user preference
- Kubernetes Cluster (v1.20+)
- MySQL Database (v8.0+)
- .NET 9 SDK (for building from source)
- Node.js 20+ and Angular CLI (for frontend development)
- Docker (for containerized deployment)
git clone <repository-url>
cd LogMk2/src
# Build entire solution
dotnet build LogMk.sln
# Create MySQL database
mysql -u root -p -e "CREATE DATABASE logmk;"
# Update connection string in src/LogMkApi/appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=logmk;Uid=root;Pwd=yourpassword;"
}
}
# Navigate to API project
cd src/LogMkApi
# Run with hot reload
dotnet run
# API available at: https://localhost:7001
# Navigate to web project
cd src/LogMkWeb
# Install dependencies
npm install
# Start development server
npm start
# Web app available at: http://localhost:6200
# Build and deploy agent
docker build -f LogMkAgent/Dockerfile -t logmk-agent .
kubectl apply -f k8s/agent-daemonset.yaml
# From src/ directory
docker build -f LogMkApi/Dockerfile -t logmk-api .
docker build -f LogMkAgent/Dockerfile -t logmk-agent .
# Deploy all components
kubectl apply -f k8s/
- Access the Web Interface: Navigate to
http://localhost:6200
(development) or your deployed URL - Authentication: Log in with your configured credentials
- Real-time Monitoring: Logs stream automatically via SignalR connection
- Multi-select Dropdowns: Filter by log levels and pods with search and select-all options
- Time Range Selection: Use predefined ranges or select custom ranges by dragging on charts
- Full-text Search: Search log content with real-time highlighting of matching terms
- Filter Presets: Save frequently used filter combinations for quick access
Ctrl/Cmd+F
- Focus search inputCtrl/Cmd+Shift+C
- Clear all active filtersE
- Show only error logsW
- Show only warning logs- Arrow keys - Navigate through log entries
- Enter - Open detailed log view
- Right-click any log entry for context menu with:
- Filter by specific pod or log level
- Hide logs from specific sources
- Copy log content
- View detailed log information
- View Modes: Toggle between compact (dense) and expanded (spacious) layouts
- Timestamp Formats: Switch between relative ("5 min ago") and absolute timestamps
- Export Options: Download filtered logs as CSV or JSON with metadata
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=logmk;Uid=root;Pwd=password;"
},
"JwtSettings": {
"SecretKey": "your-secret-key",
"ExpiryMinutes": 60,
"RefreshTokenExpiryDays": 7
},
"LogRetention": {
"RetentionDays": 30,
"CleanupIntervalHours": 24
}
}
{
"ApiSettings": {
"BaseUrl": "https://logmk-api:7001",
"BatchSize": 100,
"BatchIntervalSeconds": 5
},
"LogPaths": [
"/var/log/pods"
]
}
cd src/LogMkWeb
# Generate new component
ng generate component _components/my-component
# Run tests
npm test
# Build for production
npm run prod
# Build solution
dotnet build src/LogMk.sln
# Run specific project
dotnet run --project src/LogMkApi
dotnet run --project src/LogMkAgent
- .NET 9: Modern C# with high-performance runtime
- ServiceStack.OrmLite: Lightweight ORM for MySQL integration
- SignalR: Real-time WebSocket communication
- JWT Authentication: Secure token-based auth with refresh tokens
- Angular 20: Latest Angular with signal-based architecture
- TypeScript: Type-safe development with modern ES features
- CSS Variables: Dynamic theming with Dracula color scheme
- Virtual Scrolling: High-performance rendering for large datasets
- PWA Ready: Progressive Web App capabilities
- Lucide Angular: Modern icon library with 1000+ icons
- ng2-charts: Chart.js integration for interactive visualizations
- ngx-toastr: Toast notifications for user feedback
- date-fns: Comprehensive date manipulation utilities
- @iharbeck/ngx-virtual-scroller: Optimized virtual scrolling
- Angular CLI: Modern build system with Vite bundler
- ESLint & Prettier: Code quality and formatting
- Docker Multi-stage: Optimized container builds
- Kubernetes: Cloud-native deployment with DaemonSets
- GitHub Actions: CI/CD pipeline automation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- The .NET and Angular communities for their excellent frameworks
- SignalR team for real-time communication capabilities
- Bootstrap team for the responsive UI framework
- Kubernetes community for container orchestration