You've already forked wc-licensed-product
Add Grafana dashboard and wp-prometheus integration (v0.7.5)
All checks were successful
Create Release Package / build-release (push) Successful in 1m9s
All checks were successful
Create Release Package / build-release (push) Successful in 1m9s
- Add example Grafana dashboard with 24 panels for license metrics - Register dashboard with wp-prometheus via hook - Add dashboard documentation with PromQL examples and alerting rules - Update README with monitoring section Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
32
README.md
32
README.md
@@ -393,6 +393,38 @@ The plugin sends automatic email notifications (configurable via WooCommerce > S
|
||||
- **Expiration Warning (1 day)**: Urgent reminder sent 1 day before expiration
|
||||
- **License Expired**: Notification when a license auto-expires
|
||||
|
||||
## Monitoring with Prometheus & Grafana
|
||||
|
||||
The plugin integrates with [wp-prometheus](https://src.bundespruefstelle.ch/magdev/wp-prometheus) to expose metrics for monitoring and alerting.
|
||||
|
||||
### Enable Metrics
|
||||
|
||||
1. Install and configure the wp-prometheus plugin
|
||||
2. Go to WooCommerce > Settings > Licensed Products > Metrics
|
||||
3. Enable "Prometheus Metrics"
|
||||
|
||||
### Available Metrics
|
||||
|
||||
**Gauges:**
|
||||
|
||||
- `wclp_licenses_total{status}` - License counts by status
|
||||
- `wclp_licenses_lifetime_total` - Lifetime licenses
|
||||
- `wclp_licenses_expiring_soon` - Licenses expiring within 30 days
|
||||
- `wclp_downloads_total` - Total file downloads
|
||||
- `wclp_versions_active_total` - Active product versions
|
||||
|
||||
**Counters:**
|
||||
|
||||
- `wclp_api_requests_total{endpoint,result}` - API requests by endpoint and result
|
||||
- `wclp_rate_limit_exceeded_total{endpoint}` - Rate limit events
|
||||
- `wclp_validation_errors_total{error_type}` - Validation errors by type
|
||||
|
||||
### Grafana Dashboard
|
||||
|
||||
An example Grafana dashboard is included at [docs/grafana-dashboard.json](docs/grafana-dashboard.json).
|
||||
|
||||
See [docs/grafana-dashboard.md](docs/grafana-dashboard.md) for installation instructions, panel descriptions, and alerting examples.
|
||||
|
||||
## Changelog
|
||||
|
||||
See [CHANGELOG.md](CHANGELOG.md) for version history and changes.
|
||||
|
||||
Reference in New Issue
Block a user