Quick Start
Quick Start Guide
Section titled “Quick Start Guide”This guide will get you up and running with the License Management project in just a few minutes. We’ll cover the essential steps to get both components working together.
Prerequisites
Section titled “Prerequisites”Before starting, ensure you have:
- License Monitor installed and running
- License Server Detail installed
- Basic understanding of your license server setup
Quick Setup
Section titled “Quick Setup”Step 1: Start License Monitor
Section titled “Step 1: Start License Monitor”# Start License Monitor in API mode./license_monitor --mode api --api-host 0.0.0.0 --api-port 8080You should see output similar to:
[INFO] Starting License Monitor in API mode[INFO] API server listening on 0.0.0.0:8080[INFO] WebSocket support enabled[INFO] Server started successfullyStep 2: Test License Monitor API
Section titled “Step 2: Test License Monitor API”# Test the health endpointcurl http://localhost:8080/api/health
# Expected response:# {"status":"healthy","timestamp":"2024-01-01T12:00:00Z","version":"1.0.0"}Step 3: Start License Server Detail
Section titled “Step 3: Start License Server Detail”# Navigate to License Server Detail directorycd license-server-detail
# Start the development serverpnpm devYou should see:
✓ Ready in 2.3s○ Local: http://localhost:3000○ Network: http://192.168.1.100:3000Step 4: Access the Web Interface
Section titled “Step 4: Access the Web Interface”Open your browser and navigate to http://localhost:3000. You should see the License Server Detail interface.
Basic Configuration
Section titled “Basic Configuration”License Monitor Configuration
Section titled “License Monitor Configuration”Create a minimal configuration file:
# Create config.toml in the same directory as license_monitorcat > config.toml << EOF[command_mode]command = "lmstat -a"interval_seconds = 300
[api]enabled = truebind_address = "0.0.0.0"bind_port = 8080enable_websockets = trueEOFLicense Server Detail Environment
Section titled “License Server Detail Environment”Create a basic environment file:
# Create .env.local in the license-server-detail directorycat > .env.local << EOFNEXT_PUBLIC_API_BASE_URL=http://localhost:8080LICENSE_MONITOR_API_KEY=your-api-key-hereAUTH_SECRET=your-secret-key-hereNEXTAUTH_URL=http://localhost:3000EOFCommon Use Cases
Section titled “Common Use Cases”Use Case 1: Monitor License Commands
Section titled “Use Case 1: Monitor License Commands”# Start License Monitor in command mode./license_monitor --mode command --execute "lmstat -a" --interval 60
# This will execute "lmstat -a" every 60 seconds and make results available via APIUse Case 2: Monitor Log Files
Section titled “Use Case 2: Monitor Log Files”# Start License Monitor in tail mode./license_monitor --mode tail --file "/var/log/lmstat.log" --regex "^(\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2})\\s+(\\w+)\\s+(.*)$"Use Case 3: Combined Monitoring
Section titled “Use Case 3: Combined Monitoring”# Start both command and tail modes with API./license_monitor --mode both --execute "lmstat -a" --file "/var/log/lmstat.log"Testing Your Setup
Section titled “Testing Your Setup”Test License Monitor API
Section titled “Test License Monitor API”# Health checkcurl http://localhost:8080/api/health
# Get server infocurl http://localhost:8080/api/server-info
# Execute a command (if in command mode)curl -X POST http://localhost:8080/api/execute \ -H "Content-Type: application/json" \ -d '{"command": "lmstat -a"}'Test License Server Detail
Section titled “Test License Server Detail”- Open
http://localhost:3000in your browser - Check the browser console for any errors
- Verify that the API connection is working
Troubleshooting Quick Fixes
Section titled “Troubleshooting Quick Fixes”License Monitor Issues
Section titled “License Monitor Issues”Problem: License Monitor won’t start
# Check if port is in usenetstat -tulpn | grep :8080
# Kill process using port 8080sudo kill -9 $(lsof -t -i:8080)
# Try starting again./license_monitor --mode apiProblem: API not responding
# Check if License Monitor is runningps aux | grep license_monitor
# Check logstail -f logs/daemon.logLicense Server Detail Issues
Section titled “License Server Detail Issues”Problem: Build fails
# Clear cache and reinstallrm -rf node_modules .nextpnpm installpnpm devProblem: API connection fails
# Check environment variablescat .env.local
# Verify License Monitor is runningcurl http://localhost:8080/api/healthWhat’s Next?
Section titled “What’s Next?”Now that you have both components running, you can:
- Configure Authentication: Set up Okta authentication for License Server Detail
- Add License Servers: Configure License Monitor to monitor your actual license servers
- Set Up Real-time Monitoring: Configure log monitoring and real-time updates
- Deploy to Production: Follow our deployment guide for production setup
Next Steps
Section titled “Next Steps”- Configuration Guide: Detailed configuration options
- License Monitor Documentation: Complete License Monitor guide
- License Server Detail Documentation: Complete License Server Detail guide
- Deployment Guide: Production deployment instructions