We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e3196c commit f97dc60Copy full SHA for f97dc60
1 file changed
check_json.pl
@@ -139,8 +139,14 @@
139
if ($np->opts->verbose) { (print Dumper ($json_response))};
140
141
my @attributes = split(',', $np->opts->attributes);
142
-my @warning = split(',', $np->opts->warning);
143
-my @critical = split(',', $np->opts->critical);
+my @warning;
+if ($np->opts->warning) {
144
+ @warning = split(',', $np->opts->warning);
145
+}
146
+my @critical;
147
+if ($np->opts->critical) {
148
+ @critical = split(',', $np->opts->critical);
149
150
my @divisor = $np->opts->divisor ? split(',',$np->opts->divisor) : () ;
151
my %attributes = map { $attributes[$_] => { warning => $warning[$_] , critical => $critical[$_], divisor => ($divisor[$_] or 0) } } 0..$#attributes;
152
0 commit comments