Fix panix when using backwards compatible flags

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto 2021-03-15 14:35:03 +01:00
parent e57f30736c
commit cbf30d0744

View file

@ -131,7 +131,7 @@ func NewSystemdCollector(logger log.Logger) (Collector, error) {
}
}
if *oldUnitInclude != "" {
if *unitInclude == "" {
if *unitInclude == ".+" { // .+ is the default value for collector.systemd.unit-include.
level.Warn(logger).Log("msg", "--collector.systemd.unit-whitelist is DEPRECATED and will be removed in 2.0.0, use --collector.systemd.unit-include")
*unitInclude = *oldUnitInclude
} else {