Introduction
License Monitor Introduction
Section titled “License Monitor Introduction”License Monitor is a comprehensive Rust-based utility designed for collecting, monitoring, and managing License Manager (LM) statistics across distributed server environments. It provides real-time monitoring, web API access, and centralized data collection with support for multiple license server types.
Overview
Section titled “Overview”License Monitor serves as the backbone of the License Management project, providing:
- Real-time Monitoring: Live log file monitoring with configurable parsing patterns
- Command Execution: Periodic execution of license manager commands
- Web API: Comprehensive REST API with WebSocket and Server-Sent Events support
- Multi-server Support: Centralized data aggregation across multiple license servers
- Self-management: Secure automatic updates via GitHub Releases
- Observability: OpenTelemetry integration for metrics and logging
Architecture
Section titled “Architecture”License Monitor follows a modular architecture with clear separation of concerns:
graph TB subgraph "Core Components" CM[Command Mode] TM[Tail Mode] API[API Server] UP[Update System] end
subgraph "Data Processing" PP[Python Parser] LP[Log Parser] DP[Data Processor] end
subgraph "External Systems" LS[License Servers] OTEL[OpenTelemetry] GH[GitHub Releases] WEB[Web Clients] end
CM --> PP TM --> LP PP --> DP LP --> DP DP --> API API --> WEB UP --> GH DP --> OTEL CM --> LS TM --> LSKey Features
Section titled “Key Features”Multiple Operating Modes
Section titled “Multiple Operating Modes”License Monitor supports four distinct operational modes:
- Command Mode: Executes license manager commands periodically
- Tail Mode: Monitors log files in real-time
- API Mode: Runs only the web API server
- Both Mode: Combines command and tail modes with API server
Real-time Data Processing
Section titled “Real-time Data Processing”- Live Log Monitoring: File system notifications for real-time log processing
- Command Execution: Configurable periodic command execution
- Data Parsing: Python script integration for custom output parsing
- Batch Processing: Efficient processing of log entries and command output
Comprehensive Web API
Section titled “Comprehensive Web API”- REST Endpoints: Complete API for license information and system metrics
- WebSocket Support: Real-time bidirectional communication
- Server-Sent Events: Unidirectional real-time data streaming
- CORS Support: Configurable cross-origin resource sharing
Advanced Features
Section titled “Advanced Features”- Self-Update System: Secure automatic updates with signature verification
- OpenTelemetry Integration: Comprehensive metrics and logging export
- Configuration Management: Flexible TOML-based configuration
- Security Features: API key authentication, rate limiting, and CORS protection
- Cross-platform Support: Native support for Linux, Windows, and Unix systems
Supported License Server Types
Section titled “Supported License Server Types”License Monitor supports multiple license server types:
FlexLM (Flexible License Manager)
Section titled “FlexLM (Flexible License Manager)”- Commands:
lmstat,lmutil,lmver - Log Formats: Standard FlexLM log format
- Features: License usage tracking, server status monitoring
RLM (Reprise License Manager)
Section titled “RLM (Reprise License Manager)”- Commands:
rlmutil,rlmstat - Log Formats: RLM-specific log format
- Features: License server health monitoring
sesinetd (SES License Server)
Section titled “sesinetd (SES License Server)”- Commands: Custom SES commands
- Log Formats: SES-specific log format
- Features: SES license management
Core Components
Section titled “Core Components”Command Mode Engine
Section titled “Command Mode Engine”The command mode engine handles periodic execution of license manager commands:
- Scheduled Execution: Configurable intervals for command execution
- Python Integration: Support for custom parsing scripts
- Output Processing: Structured data extraction from command output
- Error Handling: Robust error handling and retry logic
Tail Mode Engine
Section titled “Tail Mode Engine”The tail mode engine provides real-time log file monitoring:
- File System Notifications: Efficient file change detection
- Regex Parsing: Configurable pattern matching for log entries
- Batch Processing: Efficient processing of log entries
- Rotation Support: Automatic handling of log file rotation
API Server
Section titled “API Server”The API server provides comprehensive web access to License Monitor functionality:
- REST API: Complete RESTful interface
- WebSocket Support: Real-time bidirectional communication
- Server-Sent Events: Unidirectional real-time streaming
- Authentication: API key-based authentication
- Rate Limiting: Configurable request rate limiting
Update System
Section titled “Update System”The self-update system provides secure automatic updates:
- GitHub Releases: Integration with GitHub Releases
- Signature Verification: SHA-256 checksum verification
- Channel Support: Stable and beta release channels
- Background Checks: Non-blocking update availability checks
Performance Characteristics
Section titled “Performance Characteristics”Scalability
Section titled “Scalability”- Concurrent Connections: Supports up to 1000 concurrent API connections
- Memory Efficiency: Optimized memory usage with configurable limits
- Thread Pool: Configurable thread pool for optimal performance
- Batch Processing: Efficient batch processing of data
Reliability
Section titled “Reliability”- Error Recovery: Robust error handling and recovery mechanisms
- Graceful Shutdown: Clean shutdown procedures
- Health Monitoring: Comprehensive health check endpoints
- Logging: Detailed logging for troubleshooting
Security Features
Section titled “Security Features”Authentication
Section titled “Authentication”- API Key Authentication: Secure API key-based authentication
- Token Validation: Comprehensive token validation
- Session Management: Secure session handling
Network Security
Section titled “Network Security”- CORS Protection: Configurable cross-origin resource sharing
- Rate Limiting: Request rate limiting per IP
- IP Filtering: Suspicious IP blocking capabilities
- Request Logging: Comprehensive request logging
Data Security
Section titled “Data Security”- Input Validation: Comprehensive input validation
- Output Sanitization: Secure output sanitization
- Error Handling: Secure error handling without information leakage
Integration Points
Section titled “Integration Points”OpenTelemetry Integration
Section titled “OpenTelemetry Integration”License Monitor integrates with OpenTelemetry for comprehensive observability:
- Metrics Export: License usage metrics and system performance data
- Log Export: Application logs with structured formatting
- Trace Support: Distributed tracing capabilities
- Custom Metrics: Configurable custom metrics
GitHub Releases Integration
Section titled “GitHub Releases Integration”The self-update system integrates with GitHub Releases:
- Automatic Updates: Secure automatic update downloads
- Signature Verification: SHA-256 checksum verification
- Release Channels: Support for stable and beta channels
- Rollback Support: Ability to rollback to previous versions
Next Steps
Section titled “Next Steps”- Operating Modes: Detailed guide to each operating mode
- Web API: Complete API documentation
- Configuration: Configuration options and examples
- Self-Update System: Update system documentation
- OpenTelemetry: Observability integration guide