diff --git a/check_junos.pl b/check_junos.pl index 1e6d1f9..38c5ad2 100755 --- a/check_junos.pl +++ b/check_junos.pl @@ -126,7 +126,7 @@ foreach my $arg (@args) { } $plugin->configure(); -$plugin->add_checks($valid_checks, 'chassis_environment', @ARGV); +$plugin->set_checks($valid_checks, 'chassis_environment', @ARGV); $junos = $plugin->connect(); foreach my $check ($plugin->get_checks()) { diff --git a/perl/lib/Nagios/Plugin/JUNOS.pm b/perl/lib/Nagios/Plugin/JUNOS.pm index a62e323..19ed761 100644 --- a/perl/lib/Nagios/Plugin/JUNOS.pm +++ b/perl/lib/Nagios/Plugin/JUNOS.pm @@ -184,7 +184,7 @@ sub _add_single_check push @{$self->{'conf'}->{'checks'}}, \%c; } -sub add_checks +sub set_checks { my $self = shift; my $valid_checks = shift;