Feature Request
Linux systemctl list-units used in plugins/inputs/systemd_units provides the option to filter the output based on a pattern in order to limit information to a subset of services.
This issue will be followed by a pull-request providing an implementation shortly.
Proposal:
Extend the systemd_units plugin to support patterns provided in respective conf file
Current behavior:
No pattern is supported
// SampleConfig returns sample configuration options.
func (s *SystemdUnits) SampleConfig() string {
return `
## Set timeout for systemctl execution
# timeout = "1s"
#
## Filter for a specific unit type, default is "service", other possible
## values are "socket", "target", "device", "mount", "automount", "swap",
## "timer", "path", "slice" and "scope ":
# unittype = "service"
`
}
Desired behavior:
Support pattern in config file:
// SampleConfig returns sample configuration options.
func (s *SystemdUnits) SampleConfig() string {
return `
## Set timeout for systemctl execution
# timeout = "1s"
#
## Filter for a specific unit type, default is "service", other possible
## values are "socket", "target", "device", "mount", "automount", "swap",
## "timer", "path", "slice" and "scope ":
# unittype = "service"
#
## Filter for a specific pattern, default is "" (i.e. all), other possible
## values are valid pattern for systemctl, e.g. "a*" for all units with
## names starting with "a"
# pattern = ""
## pattern = "telegraf* influxdb*"
## pattern = "a*"
`
}
Use case:
In our setup performance is critical and any option to avoid unnecessary data collection/communication is important.
Feature Request
Linux
systemctl list-unitsused inplugins/inputs/systemd_unitsprovides the option to filter the output based on a pattern in order to limit information to a subset of services.This issue will be followed by a pull-request providing an implementation shortly.
Proposal:
Extend the systemd_units plugin to support patterns provided in respective conf file
Current behavior:
No pattern is supported
Desired behavior:
Support
patternin config file:Use case:
In our setup performance is critical and any option to avoid unnecessary data collection/communication is important.