service: cache service configurations between scrapes (#2674)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jan-Otto Kröpke
2026-10-11 14:04:56 +02:00
committed by GitHub
co-authored by Claude
parent 930609b0e5
commit e6d1f00d1f
6 changed files with 877 additions and 34 deletions
+10
View File
@@ -28,6 +28,16 @@ Comma separated list of service start modes to include.
Possible values: auto, boot, manual, disabled, system.
Recommended to keep down number of returned metrics. Default: `auto,boot,manual,disabled,system`
## Configuration cache
The service configuration (display name, start mode, path and account, used by
`windows_service_info` and `windows_service_start_mode`) is cached between scrapes.
The collector watches the registry key `HKLM\SYSTEM\CurrentControlSet\Services`. When a
service's own key changes, for example after `sc config`, a change in the Services console
or a reinstall, its configuration is queried again on the next scrape. All configurations
are queried again at the latest every 10 minutes. The service state and process are queried
on every scrape.
## Metrics
| Name | Description | Type | Labels |