From 41ba71e84c5997e4120e93a51dccb08340d2ab78 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 17 Jul 2020 14:25:24 +0200 Subject: [PATCH] fix linux local --- os/linux/local/mode/packeterrors.pm | 2 +- os/linux/local/mode/traffic.pm | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/os/linux/local/mode/packeterrors.pm b/os/linux/local/mode/packeterrors.pm index 534147aa4..02476aa8e 100644 --- a/os/linux/local/mode/packeterrors.pm +++ b/os/linux/local/mode/packeterrors.pm @@ -227,7 +227,7 @@ sub manage_selection { $self->do_selection(custom => $options{custom}); $self->{cache_name} = 'cache_linux_local_' . $options{custom}->get_identifier() . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all')) . '_' . - (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')); + (defined($self->{option_results}->{filter_interface}) ? md5_hex($self->{option_results}->{filter_interface}) : md5_hex('all')); } 1; diff --git a/os/linux/local/mode/traffic.pm b/os/linux/local/mode/traffic.pm index 6e7d31daa..62c9d85f2 100644 --- a/os/linux/local/mode/traffic.pm +++ b/os/linux/local/mode/traffic.pm @@ -136,14 +136,14 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - 'filter-state:s' => { name => 'filter_state', }, + 'filter-state:s' => { name => 'filter_state', }, 'filter-interface:s' => { name => 'filter_interface' }, - 'units:s' => { name => 'units', default => 'b/s' }, - 'speed:s' => { name => 'speed' }, - 'no-loopback' => { name => 'no_loopback', }, - 'unknown-status:s' => { name => 'unknown_status', default => '' }, - 'warning-status:s' => { name => 'warning_status', default => '' }, - 'critical-status:s' => { name => 'critical_status', default => '%{status} ne "RU"' }, + 'units:s' => { name => 'units', default => 'b/s' }, + 'speed:s' => { name => 'speed' }, + 'no-loopback' => { name => 'no_loopback', }, + 'unknown-status:s' => { name => 'unknown_status', default => '' }, + 'warning-status:s' => { name => 'warning_status', default => '' }, + 'critical-status:s' => { name => 'critical_status', default => '%{status} ne "RU"' }, }); return $self; @@ -236,7 +236,7 @@ sub manage_selection { $self->do_selection(custom => $options{custom}); $self->{cache_name} = 'cache_linux_local_' . $options{custom}->get_identifier() . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all')) . '_' . - (defined($self->{option_results}->{name}) ? md5_hex($self->{option_results}->{name}) : md5_hex('all')); + (defined($self->{option_results}->{filter_interface}) ? md5_hex($self->{option_results}->{filter_interface}) : md5_hex('all')); } 1;