check_junos: Added support for the exclude feature to all checks.
This commit is contained in:
parent
864a0e6dcd
commit
c559d48491
|
@ -278,7 +278,13 @@ sub check_interfaces
|
||||||
foreach my $iface (@interfaces) {
|
foreach my $iface (@interfaces) {
|
||||||
my $name = $plugin->get_query_object_value($iface, 'name');
|
my $name = $plugin->get_query_object_value($iface, 'name');
|
||||||
my $desc = $plugin->get_query_object_value($iface, 'description');
|
my $desc = $plugin->get_query_object_value($iface, 'description');
|
||||||
my $status = check_interface($plugin, $iface, $opts, @$targets);
|
my $status;
|
||||||
|
|
||||||
|
if (grep { m/^$name$/ } @$exclude) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = check_interface($plugin, $iface, $opts, @$targets);
|
||||||
|
|
||||||
my $tmp;
|
my $tmp;
|
||||||
|
|
||||||
|
@ -383,6 +389,10 @@ sub check_interface_forwarding
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (grep { m/^$name$/ } @$exclude) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
foreach my $vlan_member ($plugin->get_query_object($iface,
|
foreach my $vlan_member ($plugin->get_query_object($iface,
|
||||||
['interface-vlan-member-list', 'interface-vlan-member'])) {
|
['interface-vlan-member-list', 'interface-vlan-member'])) {
|
||||||
my $status = $plugin->get_query_object_value($vlan_member,
|
my $status = $plugin->get_query_object_value($vlan_member,
|
||||||
|
@ -444,6 +454,10 @@ sub check_chassis_environment
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (grep { m/^$name$/ } @$exclude) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
if ($plugin->get_query_object_value($item, 'class')) {
|
if ($plugin->get_query_object_value($item, 'class')) {
|
||||||
$class = $plugin->get_query_object_value($item, 'class');
|
$class = $plugin->get_query_object_value($item, 'class');
|
||||||
}
|
}
|
||||||
|
@ -539,6 +553,10 @@ sub check_system_storage
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (grep { m/^$mnt_pt$/ } @$exclude) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
my $used = $plugin->get_query_object_value($fs, 'used-percent') + 0;
|
my $used = $plugin->get_query_object_value($fs, 'used-percent') + 0;
|
||||||
|
|
||||||
my $state = $plugin->check_threshold($used);
|
my $state = $plugin->check_threshold($used);
|
||||||
|
|
Loading…
Reference in a new issue