Tracking License Usage
This workflow covers tracking license usage, monitoring consumption patterns, and analyzing license utilization. Use this to understand how licenses are being used and optimize license allocation.
Prerequisites
Section titled “Prerequisites”- API credentials with entitlement and telemetry read permissions
- Entitlements configured and active
- Understanding of your license allocation and policies
Understanding License Usage Tracking
Section titled “Understanding License Usage Tracking”License usage tracking provides:
- Current usage — Active leases and seat consumption
- Usage history — Historical usage patterns and trends
- Utilization metrics — Percentage of licenses in use
- Subject activity — Which users or machines are using licenses
Step 1: Check Current Usage
Section titled “Step 1: Check Current Usage”Query current license usage for an entitlement:
curl "${BP_BASE_URL}/v1/entitlements/ent_abc123/usage" \ -H "Authorization: Bearer $BP_API_TOKEN"Response:
{ "entitlement_id": "ent_abc123", "policy": { "type": "concurrent", "max_seats": 25 }, "current_usage": { "active_leases": 18, "seats_used": 18, "seats_available": 7, "utilization_percent": 72.0 }, "active_subjects": [ { "subject_type": "user", "subject_id": "user_123", "lease_id": "lease_xyz789", "issued_at": "2024-01-15T09:00:00Z", "expires_at": "2024-01-15T11:00:00Z" } ]}Step 2: Query Usage by Product
Section titled “Step 2: Query Usage by Product”Get usage across all entitlements for a product:
curl "${BP_BASE_URL}/v1/products/prod_xyz789/usage" \ -H "Authorization: Bearer $BP_API_TOKEN"Response:
{ "product_id": "prod_xyz789", "total_entitlements": 5, "total_seats": 125, "seats_used": 89, "seats_available": 36, "utilization_percent": 71.2, "entitlements": [ { "entitlement_id": "ent_abc123", "seats_used": 18, "max_seats": 25, "utilization_percent": 72.0 } ]}Step 3: Query Usage by Tenant
Section titled “Step 3: Query Usage by Tenant”Get usage across all entitlements for a tenant:
curl "${BP_BASE_URL}/v1/tenants/tenant_abc123/usage" \ -H "Authorization: Bearer $BP_API_TOKEN"Response:
{ "tenant_id": "tenant_abc123", "total_entitlements": 10, "total_seats": 250, "seats_used": 187, "seats_available": 63, "utilization_percent": 74.8, "products": [ { "product_id": "prod_xyz789", "seats_used": 89, "max_seats": 125, "utilization_percent": 71.2 } ]}Step 4: Query Usage History
Section titled “Step 4: Query Usage History”Get historical usage data:
curl "${BP_BASE_URL}/v1/entitlements/ent_abc123/usage/history?start_date=2024-01-01&end_date=2024-01-31" \ -H "Authorization: Bearer $BP_API_TOKEN"Response:
{ "entitlement_id": "ent_abc123", "period": { "start_date": "2024-01-01T00:00:00Z", "end_date": "2024-01-31T23:59:59Z" }, "daily_usage": [ { "date": "2024-01-15", "peak_seats_used": 20, "average_seats_used": 18.5, "lease_count": 45 } ], "summary": { "peak_seats_used": 22, "average_seats_used": 18.2, "total_leases": 1350 }}Step 5: Query Subject Activity
Section titled “Step 5: Query Subject Activity”Get usage by specific subject (user or machine):
curl "${BP_BASE_URL}/v1/license/status?product_id=prod_xyz789&subject_type=user&subject_id=user_123" \ -H "Authorization: Bearer $BP_API_TOKEN"Response:
{ "entitlement_id": "ent_abc123", "status": "active", "current_lease": { "lease_id": "lease_xyz789", "issued_at": "2024-01-15T09:00:00Z", "expires_at": "2024-01-15T11:00:00Z" }, "features": ["feature-a", "feature-b"], "usage": { "concurrent_seats_used": 18, "max_seats": 25 }}Usage Metrics
Section titled “Usage Metrics”Key metrics to monitor:
Utilization rate:
- Percentage of licenses in use
- Peak vs average utilization
- Trends over time
Lease patterns:
- Number of leases issued
- Average lease duration
- Lease renewal frequency
Subject activity:
- Most active users/machines
- Inactive subjects
- Usage distribution
Analyzing Usage Patterns
Section titled “Analyzing Usage Patterns”Identify underutilization:
- Entitlements with low utilization may have excess capacity
- Consider reducing seat counts or reallocating licenses
Identify overutilization:
- Entitlements approaching capacity may need more seats
- Monitor peak usage times
Identify inactive subjects:
- Subjects that haven’t used licenses in a while
- Consider revoking access or reallocating licenses
Exporting Usage Data
Section titled “Exporting Usage Data”Export usage data for analysis:
curl "${BP_BASE_URL}/v1/entitlements/ent_abc123/usage/export?format=csv&start_date=2024-01-01&end_date=2024-01-31" \ -H "Authorization: Bearer $BP_API_TOKEN" \ -o usage_report.csvFormats supported:
- CSV — For spreadsheet analysis
- JSON — For programmatic analysis
Monitoring and Alerting
Section titled “Monitoring and Alerting”Set up alerts for usage thresholds:
High utilization alert:
- Alert when utilization exceeds threshold (e.g., 90%)
- Helps prevent license exhaustion
Low utilization alert:
- Alert when utilization is below threshold (e.g., 10%)
- Helps identify unused licenses
Expiration alerts:
- Alert when entitlements are expiring soon
- See Managing Entitlement Expiration
Best Practices
Section titled “Best Practices”Monitor regularly: Check usage metrics regularly to understand patterns.
Track trends: Analyze historical usage to identify trends and patterns.
Optimize allocation: Adjust seat counts based on actual usage patterns.
Set alerts: Configure alerts for high or low utilization.
Export data: Export usage data for detailed analysis and reporting.
Review inactive subjects: Periodically review and clean up inactive subjects.
Next Steps
Section titled “Next Steps”- Manage entitlement expiration — see Managing Entitlement Expiration
- Revoke unused access — see Revoking Access
- Configure usage policies — see Managing Update Policies