From 8ff13ed649a47e4420fe49be2c96bc8884b22ca3 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 4 Oct 2019 09:01:41 +0200 Subject: [PATCH] enhance typo --- network/teltonika/snmp/mode/system.pm | 17 ++++++++++------- network/teltonika/snmp/plugin.pm | 6 +++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/network/teltonika/snmp/mode/system.pm b/network/teltonika/snmp/mode/system.pm index 1909bd033..5604db4e8 100644 --- a/network/teltonika/snmp/mode/system.pm +++ b/network/teltonika/snmp/mode/system.pm @@ -115,8 +115,8 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - 'warning-status:s' => { name => 'warning_status', default => '' }, - 'critical-status:s' => { name => 'critical_status', default => '%{connection_state} !~ /connected/i' }, + 'warning-status:s' => { name => 'warning_status', default => '' }, + 'critical-status:s' => { name => 'critical_status', default => '%{connection_state} !~ /connected/i' }, }); return $self; @@ -142,11 +142,14 @@ sub manage_selection { my $oid_Received = '.1.3.6.1.4.1.48690.2.20.0'; my $oid_RSRP = '.1.3.6.1.4.1.48690.2.23.0'; my $oid_RSRQ = '.1.3.6.1.4.1.48690.2.24.0'; - my $result = $options{snmp}->get_leef(oids => [ - $oid_SimState, $oid_PinState, $oid_NetState, $oid_ConnectionState, - $oid_Signal, $oid_Temperature, $oid_Sent, $oid_Received, - $oid_RSRP, $oid_RSRQ - ], nothing_quit => 1); + my $result = $options{snmp}->get_leef( + oids => [ + $oid_SimState, $oid_PinState, $oid_NetState, $oid_ConnectionState, + $oid_Signal, $oid_Temperature, $oid_Sent, $oid_Received, + $oid_RSRP, $oid_RSRQ + ], + nothing_quit => 1 + ); $self->{cache_name} = "teltonika_" . $options{snmp}->get_hostname() . '_' . $options{snmp}->get_port() . '_' . $self->{mode} . '_' . (defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all')); diff --git a/network/teltonika/snmp/plugin.pm b/network/teltonika/snmp/plugin.pm index 1c0317ad6..3e5ab94c7 100644 --- a/network/teltonika/snmp/plugin.pm +++ b/network/teltonika/snmp/plugin.pm @@ -31,9 +31,9 @@ sub new { $self->{version} = '1.0'; %{$self->{modes}} = ( - 'interfaces' => 'snmp_standard::mode::interfaces', - 'list-interfaces' => 'snmp_standard::mode::listinterfaces', - 'system' => 'network::teltonika::snmp::mode::system', + 'interfaces' => 'snmp_standard::mode::interfaces', + 'list-interfaces' => 'snmp_standard::mode::listinterfaces', + 'system' => 'network::teltonika::snmp::mode::system', ); return $self;