-
Notifications
You must be signed in to change notification settings - Fork 752
Description
Problem Statement
(This is a continuation of issue #2174 which was closed prior to having all of the details needed)
With the previous WMI implementation it was easy to ignore disabled services with a clause that included the StartMode <> 'Disabled' filter in the query. With the refactor to not use WMI we've lost the ability to limit collection to only collect services that are not disabled.
How do you use relabel to drop this metric:
windows_service_state{name="dcsvc",state="stopped"} 1
but only where
windows_service_start_mode{name="dcsvc", start_mode="disabled"} 1
(start_mode and state are stored under different metrics)
With the previous integration, this would have been handled with
where_clause = "(name = 'dcsvc') AND StartMode <> 'Disabled'"
Proposed Solution
Implement a new CLI flag/ configuration that would allow for a subset of StartModes to be collected (--collector.service.start_modes = 'boot|manual|auto|system' or just --collector.service.collect_disabled = false)
Additional information
Another solution would be to add the start_mode as a label on the other metrics, however that seems like a poor pattern to follow when there's another metric for start_mode.
Acceptance Criteria
No response