From f021c8cddd67477d25f342fc97cf0f2aa39df740 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 26 May 2023 20:07:56 -0600 Subject: [PATCH] check_bandwidth: fix icinga2 merging args --- check_bandwidth.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check_bandwidth.py b/check_bandwidth.py index b946a50..590799d 100755 --- a/check_bandwidth.py +++ b/check_bandwidth.py @@ -19,6 +19,10 @@ parser.add_argument('--ignore', nargs='*', default=[], help='Interface names to parser.add_argument('--ignore-re', default=None, help='Regex matching interface names to ignore.') args = parser.parse_args() +# Icinga2 will merge the args to one string +if len(args.ignore) == 1: + args.ignore = args.ignore[0].split(' ') + if args.ignore_re: ignore_re = re.compile(args.ignore_re) else: