Skip to content

Quick Start

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.

Before starting, ensure you have:

  • License Monitor installed and running
  • License Server Detail installed
  • Basic understanding of your license server setup
Terminal window
# Start License Monitor in API mode
./license_monitor --mode api --api-host 0.0.0.0 --api-port 8080

You 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 successfully
Terminal window
# Test the health endpoint
curl http://localhost:8080/api/health
# Expected response:
# {"status":"healthy","timestamp":"2024-01-01T12:00:00Z","version":"1.0.0"}
Terminal window
# Navigate to License Server Detail directory
cd license-server-detail
# Start the development server
pnpm dev

You should see:

✓ Ready in 2.3s
○ Local: http://localhost:3000
○ Network: http://192.168.1.100:3000

Open your browser and navigate to http://localhost:3000. You should see the License Server Detail interface.

Create a minimal configuration file:

Terminal window
# Create config.toml in the same directory as license_monitor
cat > config.toml << EOF
[command_mode]
command = "lmstat -a"
interval_seconds = 300
[api]
enabled = true
bind_address = "0.0.0.0"
bind_port = 8080
enable_websockets = true
EOF

Create a basic environment file:

Terminal window
# Create .env.local in the license-server-detail directory
cat > .env.local << EOF
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
LICENSE_MONITOR_API_KEY=your-api-key-here
AUTH_SECRET=your-secret-key-here
NEXTAUTH_URL=http://localhost:3000
EOF
Terminal window
# 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 API
Terminal window
# 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+(.*)$"
Terminal window
# Start both command and tail modes with API
./license_monitor --mode both --execute "lmstat -a" --file "/var/log/lmstat.log"
Terminal window
# Health check
curl http://localhost:8080/api/health
# Get server info
curl 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"}'
  1. Open http://localhost:3000 in your browser
  2. Check the browser console for any errors
  3. Verify that the API connection is working

Problem: License Monitor won’t start

Terminal window
# Check if port is in use
netstat -tulpn | grep :8080
# Kill process using port 8080
sudo kill -9 $(lsof -t -i:8080)
# Try starting again
./license_monitor --mode api

Problem: API not responding

Terminal window
# Check if License Monitor is running
ps aux | grep license_monitor
# Check logs
tail -f logs/daemon.log

Problem: Build fails

Terminal window
# Clear cache and reinstall
rm -rf node_modules .next
pnpm install
pnpm dev

Problem: API connection fails

Terminal window
# Check environment variables
cat .env.local
# Verify License Monitor is running
curl http://localhost:8080/api/health

Now that you have both components running, you can:

  1. Configure Authentication: Set up Okta authentication for License Server Detail
  2. Add License Servers: Configure License Monitor to monitor your actual license servers
  3. Set Up Real-time Monitoring: Configure log monitoring and real-time updates
  4. Deploy to Production: Follow our deployment guide for production setup