From 8d6f003fd3d9fcaf4ada6b005b8df28531ce3bc5 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 8 Jul 2019 09:05:52 +0200 Subject: [PATCH] remove dep in rad airmux --- .../network/rad/airmux/snmp/mode/alarms.pm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/centreon-plugins/network/rad/airmux/snmp/mode/alarms.pm b/centreon-plugins/network/rad/airmux/snmp/mode/alarms.pm index 76a530c8c..a8faeb290 100644 --- a/centreon-plugins/network/rad/airmux/snmp/mode/alarms.pm +++ b/centreon-plugins/network/rad/airmux/snmp/mode/alarms.pm @@ -76,14 +76,12 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - "filter-msg:s" => { name => 'filter_msg' }, - "warning-status:s" => { name => 'warning_status', default => '%{severity} =~ /minor|warning/i' }, - "critical-status:s" => { name => 'critical_status', default => '%{severity} =~ /critical|major/i' }, - "memory" => { name => 'memory' }, + 'filter-msg:s' => { name => 'filter_msg' }, + 'warning-status:s' => { name => 'warning_status', default => '%{severity} =~ /minor|warning/i' }, + 'critical-status:s' => { name => 'critical_status', default => '%{severity} =~ /critical|major/i' }, + 'memory' => { name => 'memory' }, }); - - centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Date::Parse', - error_msg => "Cannot load module 'Date::Parse'."); + $self->{statefile_cache} = centreon::plugins::statefile->new(%options); return $self; } @@ -131,8 +129,8 @@ sub manage_selection { my $instance = $1; my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $instance); - my $create_time = $result->{radwllMilOduAgnLastEventsTimeT}; - $result->{radwllMilOduAgnLastEventsTimeT} = strftime("%d/%m/%Y %H:%M:%S",localtime($result->{radwllMilOduAgnLastEventsTimeT})); + my $create_time = $result->{radwllMilOduAgnLastEventsTimeT}; + $result->{radwllMilOduAgnLastEventsTimeT} = strftime("%d/%m/%Y %H:%M:%S", localtime($result->{radwllMilOduAgnLastEventsTimeT})); if (!defined($create_time)) { $self->{manager}->{output}->output_add(severity => 'UNKNOWN', short_msg => "Can't get date '" . $result->{radwllMilOduAgnLastEventsTimeT} . "'");