Fix service matching logic to use contains instead of exact match
The service discovery was using exact equality (==) instead of contains matching, preventing services like 'sshd' from matching the 'sshd' pattern. Restore original contains-based matching logic to find configured services.
This commit is contained in:
parent
29d371f1a8
commit
f3a81f7a0d
@ -196,7 +196,7 @@ impl SystemdCollector {
|
||||
|
||||
// Check if this service matches our filter patterns
|
||||
for pattern in service_name_filters {
|
||||
if service_name == pattern {
|
||||
if service_name.contains(pattern) || pattern.contains(service_name) {
|
||||
debug!(
|
||||
"INCLUDING service '{}' because it matches pattern '{}'",
|
||||
service_name, pattern
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user