fix(juniper): fixes after updated packs tests (#5616)

This commit is contained in:
sdepassio 2025-06-11 18:04:46 +02:00 committed by GitHub
parent 4baf784e5e
commit d9bb91e9cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{ {
"pkg_name": "centreon-plugin-Network-Routers-Juniper-Mseries-Snmp", "pkg_name": "centreon-plugin-Network-Routers-Juniper-Mseries-Snmp",
"pkg_summary": "Centreon Plugin", "pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_juniper_mseries.pl", "plugin_name": "centreon_juniper_mseries_snmp.pl",
"files": [ "files": [
"centreon/plugins/script_snmp.pm", "centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm", "centreon/plugins/snmp.pm",

View File

@ -276,7 +276,7 @@ You can use the following variables: C<%{id}>, C<%{remoteAddress}>, C<%{connecti
=item B<--critical-status> =item B<--critical-status>
Define the conditions to match for the status to be CRITICAL (default: C<'%{lspState} !~ /up/i'>). Define the conditions to match for the status to be CRITICAL (default: C<'%{connectionState} !~ /open$/i || %{sessionState} !~ /operational/i'>).
You can use the following variables: C<%{id}>, C<%{remoteAddress}>, C<%{connectionState}>, C<%{sessionState}> You can use the following variables: C<%{id}>, C<%{remoteAddress}>, C<%{connectionState}>, C<%{sessionState}>
=item B<--warning-ldp-session-messages-address-received> =item B<--warning-ldp-session-messages-address-received>

View File

@ -30,8 +30,8 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{modes} = { $self->{modes} = {
'apn-stats' => 'network::juniper::ggsn::mode::apnstats', 'apn-stats' => 'network::juniper::ggsn::snmp::mode::apnstats',
'global-stats' => 'network::juniper::ggsn::mode::globalstats' 'global-stats' => 'network::juniper::ggsn::snmp::mode::globalstats'
}; };
return $self; return $self;

View File

@ -35,10 +35,10 @@ sub new {
'cpu-forwarding' => 'network::juniper::common::junos::snmp::mode::cpuforwarding', # packet forwarding engine 'cpu-forwarding' => 'network::juniper::common::junos::snmp::mode::cpuforwarding', # packet forwarding engine
'memory' => 'network::juniper::common::junos::snmp::mode::memory', 'memory' => 'network::juniper::common::junos::snmp::mode::memory',
'memory-forwarding' => 'network::juniper::common::junos::snmp::mode::memoryforwarding', # packet forwarding engine 'memory-forwarding' => 'network::juniper::common::junos::snmp::mode::memoryforwarding', # packet forwarding engine
'cp-sessions' => 'network::juniper::common::junos::mode::snmp::cpsessions', # CP = 'central point' 'cp-sessions' => 'network::juniper::common::junos::snmp::mode::cpsessions', # CP = 'central point'
'flow-sessions' => 'network::juniper::common::junos::mode::snmp::flowsessions', 'flow-sessions' => 'network::juniper::common::junos::snmp::mode::flowsessions',
'interfaces' => 'network::juniper::common::junos::mode::snmp::interfaces', 'interfaces' => 'network::juniper::common::junos::snmp::mode::interfaces',
'ipsec-tunnel' => 'network::juniper::common::junos::mode::snmp::ipsectunnel', 'ipsec-tunnel' => 'network::juniper::common::junos::snmp::mode::ipsectunnel',
'list-interfaces' => 'snmp_standard::mode::listinterfaces', 'list-interfaces' => 'snmp_standard::mode::listinterfaces',
'list-storages' => 'snmp_standard::mode::liststorages', 'list-storages' => 'snmp_standard::mode::liststorages',
'storage' => 'snmp_standard::mode::storage' 'storage' => 'snmp_standard::mode::storage'

View File

@ -39,6 +39,8 @@ Interface ${tc}
... WARNING: Interface 'ge-0/2/0' status : down (admin: up) - Interface 'ge-0/2/0.199' status : down (admin: up) - Interface 'ge-0/2/0.32767' status : down (admin: up) - Interface 'ge-0/2/7' status : down (admin: up) - Interface 'ge-0/2/8' status : down (admin: up) - Interface 'ge-0/2/9' status : down (admin: up) - Interface 'ge-0/3/0' status : down (admin: up) - Interface 'ge-0/3/0.0' status : down (admin: up) - Interface 'ge-0/3/1' status : down (admin: up) - Interface 'ge-0/3/1.2301' status : down (admin: up) - Interface 'ge-0/3/1.32767' status : down (admin: up) - Interface 'ge-0/3/1.4002' status : down (admin: up) - Interface 'ge-0/3/2' status : down (admin: down) - Interface 'ge-0/3/2.2301' status : down (admin: down) - Interface 'ge-0/3/2.32767' status : down (admin: down) - Interface 'ge-0/3/2.4002' status : down (admin: down) - Interface 'ge-0/3/4' status : down (admin: up) - Interface 'ge-0/3/4.118' status : down (admin: up) - Interface 'ge-0/3/4.32767' status : down (admin: up) - Interface 'ge-0/3/5' status : down (admin: up) - Interface 'ge-0/3/5.32767' status : down (admin: up) - Interface 'ge-0/3/5.4002' status : down (admin: up) - Interface 'ge-0/3/6' status : down (admin: up) - Interface 'ge-0/3/7' status : down (admin: up) - Interface 'ge-0/3/8' status : down (admin: up) - Interface 'ge-0/3/9' status : down (admin: up) - Interface 'xe-2/0/3' status : down (admin: up) - Interface 'xe-2/0/3.16386' status : down (admin: up) ... WARNING: Interface 'ge-0/2/0' status : down (admin: up) - Interface 'ge-0/2/0.199' status : down (admin: up) - Interface 'ge-0/2/0.32767' status : down (admin: up) - Interface 'ge-0/2/7' status : down (admin: up) - Interface 'ge-0/2/8' status : down (admin: up) - Interface 'ge-0/2/9' status : down (admin: up) - Interface 'ge-0/3/0' status : down (admin: up) - Interface 'ge-0/3/0.0' status : down (admin: up) - Interface 'ge-0/3/1' status : down (admin: up) - Interface 'ge-0/3/1.2301' status : down (admin: up) - Interface 'ge-0/3/1.32767' status : down (admin: up) - Interface 'ge-0/3/1.4002' status : down (admin: up) - Interface 'ge-0/3/2' status : down (admin: down) - Interface 'ge-0/3/2.2301' status : down (admin: down) - Interface 'ge-0/3/2.32767' status : down (admin: down) - Interface 'ge-0/3/2.4002' status : down (admin: down) - Interface 'ge-0/3/4' status : down (admin: up) - Interface 'ge-0/3/4.118' status : down (admin: up) - Interface 'ge-0/3/4.32767' status : down (admin: up) - Interface 'ge-0/3/5' status : down (admin: up) - Interface 'ge-0/3/5.32767' status : down (admin: up) - Interface 'ge-0/3/5.4002' status : down (admin: up) - Interface 'ge-0/3/6' status : down (admin: up) - Interface 'ge-0/3/7' status : down (admin: up) - Interface 'ge-0/3/8' status : down (admin: up) - Interface 'ge-0/3/9' status : down (admin: up) - Interface 'xe-2/0/3' status : down (admin: up) - Interface 'xe-2/0/3.16386' status : down (admin: up)
... 7 --critical-status='\\\%{opstatus} eq "down"' ... 7 --critical-status='\\\%{opstatus} eq "down"'
... CRITICAL: Interface 'ge-0/2/0' status : down (admin: up) - Interface 'ge-0/2/0.199' status : down (admin: up) - Interface 'ge-0/2/0.32767' status : down (admin: up) - Interface 'ge-0/2/7' status : down (admin: up) - Interface 'ge-0/2/8' status : down (admin: up) - Interface 'ge-0/2/9' status : down (admin: up) - Interface 'ge-0/3/0' status : down (admin: up) - Interface 'ge-0/3/0.0' status : down (admin: up) - Interface 'ge-0/3/1' status : down (admin: up) - Interface 'ge-0/3/1.2301' status : down (admin: up) - Interface 'ge-0/3/1.32767' status : down (admin: up) - Interface 'ge-0/3/1.4002' status : down (admin: up) - Interface 'ge-0/3/2' status : down (admin: down) - Interface 'ge-0/3/2.2301' status : down (admin: down) - Interface 'ge-0/3/2.32767' status : down (admin: down) - Interface 'ge-0/3/2.4002' status : down (admin: down) - Interface 'ge-0/3/4' status : down (admin: up) - Interface 'ge-0/3/4.118' status : down (admin: up) - Interface 'ge-0/3/4.32767' status : down (admin: up) - Interface 'ge-0/3/5' status : down (admin: up) - Interface 'ge-0/3/5.32767' status : down (admin: up) - Interface 'ge-0/3/5.4002' status : down (admin: up) - Interface 'ge-0/3/6' status : down (admin: up) - Interface 'ge-0/3/7' status : down (admin: up) - Interface 'ge-0/3/8' status : down (admin: up) - Interface 'ge-0/3/9' status : down (admin: up) - Interface 'xe-2/0/3' status : down (admin: up) - Interface 'xe-2/0/3.16386' status : down (admin: up) ... CRITICAL: Interface 'ge-0/2/0' status : down (admin: up) - Interface 'ge-0/2/0.199' status : down (admin: up) - Interface 'ge-0/2/0.32767' status : down (admin: up) - Interface 'ge-0/2/7' status : down (admin: up) - Interface 'ge-0/2/8' status : down (admin: up) - Interface 'ge-0/2/9' status : down (admin: up) - Interface 'ge-0/3/0' status : down (admin: up) - Interface 'ge-0/3/0.0' status : down (admin: up) - Interface 'ge-0/3/1' status : down (admin: up) - Interface 'ge-0/3/1.2301' status : down (admin: up) - Interface 'ge-0/3/1.32767' status : down (admin: up) - Interface 'ge-0/3/1.4002' status : down (admin: up) - Interface 'ge-0/3/2' status : down (admin: down) - Interface 'ge-0/3/2.2301' status : down (admin: down) - Interface 'ge-0/3/2.32767' status : down (admin: down) - Interface 'ge-0/3/2.4002' status : down (admin: down) - Interface 'ge-0/3/4' status : down (admin: up) - Interface 'ge-0/3/4.118' status : down (admin: up) - Interface 'ge-0/3/4.32767' status : down (admin: up) - Interface 'ge-0/3/5' status : down (admin: up) - Interface 'ge-0/3/5.32767' status : down (admin: up) - Interface 'ge-0/3/5.4002' status : down (admin: up) - Interface 'ge-0/3/6' status : down (admin: up) - Interface 'ge-0/3/7' status : down (admin: up) - Interface 'ge-0/3/8' status : down (admin: up) - Interface 'ge-0/3/9' status : down (admin: up) - Interface 'xe-2/0/3' status : down (admin: up) - Interface 'xe-2/0/3.16386' status : down (admin: up)
... 8 --filter-use=name --filter-interface=ge-0/2/0
... CRITICAL: Interface 'ge-0/2/0' status : down (admin: up) - Interface 'ge-0/2/0.199' status : down (admin: up) - Interface 'ge-0/2/0.32767' status : down (admin: up)
Interface regex ${tc} Interface regex ${tc}
[Tags] network juniper mseries netconf [Tags] network juniper mseries netconf