mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
license collector (#1524)
This commit is contained in:
53
docs/collector.license.md
Normal file
53
docs/collector.license.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# license collector
|
||||
|
||||
The license collector exposes metrics about the Windows license status.
|
||||
|
||||
|||
|
||||
-|-
|
||||
Metric name prefix | `license`
|
||||
Data source | Win32
|
||||
Enabled by default? | No
|
||||
|
||||
## Flags
|
||||
|
||||
None
|
||||
|
||||
## Metrics
|
||||
|
||||
| Name | Description | Type | Labels |
|
||||
|--------------------------|----------------|-------|---------|
|
||||
| `windows_license_status` | license status | gauge | `state` |
|
||||
|
||||
### Example metric
|
||||
|
||||
```
|
||||
# HELP windows_license_status Status of windows license
|
||||
# TYPE windows_license_status gauge
|
||||
windows_license_status{state="genuine"} 1
|
||||
windows_license_status{state="invalid_license"} 0
|
||||
windows_license_status{state="last"} 0
|
||||
windows_license_status{state="offline"} 0
|
||||
windows_license_status{state="tampered"} 0
|
||||
```
|
||||
|
||||
|
||||
## Useful queries
|
||||
|
||||
Show if the license is genuine
|
||||
|
||||
```
|
||||
windows_license_status{state="genuine"}
|
||||
```
|
||||
|
||||
## Alerting examples
|
||||
**prometheus.rules**
|
||||
```yaml
|
||||
- alert: "WindowsLicense"
|
||||
expr: 'windows_license_status{state="genuine"} == 0'
|
||||
for: "10m"
|
||||
labels:
|
||||
severity: "high"
|
||||
annotations:
|
||||
summary: "Windows system license is not genuine"
|
||||
description: "The Windows system license is not genuine. Please check the license status."
|
||||
```
|
||||
Reference in New Issue
Block a user