mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-26 23:24:27 +02:00
enh(add new test mode): network::fortinet::fortigate::snmp, Mode(sdwan) (#5421)
Co-authored-by: Patrick <jummo4@yahoo.de> Refs:CTOR-1322
This commit is contained in:
parent
4e10376ec7
commit
ee48767a11
@ -314,9 +314,9 @@ sub manage_selection {
|
|||||||
name => $self->{sdwan}->{$_}->{name},
|
name => $self->{sdwan}->{$_}->{name},
|
||||||
vdom => $result->{vdom},
|
vdom => $result->{vdom},
|
||||||
ifName => $result->{ifName},
|
ifName => $result->{ifName},
|
||||||
in => $result->{traffic_in} * 1000 * 1000,
|
in => $result->{traffic_in} * 1000,
|
||||||
out => $result->{traffic_out} * 1000 * 1000,
|
out => $result->{traffic_out} * 1000,
|
||||||
bi => $result->{traffic_bi} * 1000 * 1000,
|
bi => $result->{traffic_bi} * 1000,
|
||||||
};
|
};
|
||||||
|
|
||||||
$self->{sdwan}->{$_}->{jitter} = {
|
$self->{sdwan}->{$_}->{jitter} = {
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.2.7 = STRING: fgVWLHealthCheckLinkName
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.4.7 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.5.7 = STRING: 8.617
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.6.7 = STRING: 0.065
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.9.7 = STRING: 0.000
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.10.7 = STRING: root
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.11.7 = INTEGER: 27453
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.12.7 = INTEGER: 29552
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.13.7 = INTEGER: 57005
|
||||||
|
.1.3.6.1.4.1.12356.101.4.9.2.1.14.7 = STRING: wan1
|
||||||
|
.2.3.6.1.4.1.12356.101.4.9.2.1.2.7 = STRING: INTERNET
|
36
tests/network/fortinet/fortigate/snmp/sdawn.robot
Normal file
36
tests/network/fortinet/fortigate/snmp/sdawn.robot
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation Check sd-wan links.
|
||||||
|
|
||||||
|
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
|
||||||
|
|
||||||
|
Suite Setup Ctn Generic Suite Setup
|
||||||
|
Test Timeout 120s
|
||||||
|
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${CMD} ${CENTREON_PLUGINS} --plugin=network::fortinet::fortigate::snmp::plugin
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
sdwan ${tc}
|
||||||
|
[Tags] network sdwan
|
||||||
|
${command} Catenate
|
||||||
|
... ${CMD}
|
||||||
|
... --mode=sdwan
|
||||||
|
... --hostname=${HOSTNAME}
|
||||||
|
... --snmp-version=${SNMPVERSION}
|
||||||
|
... --snmp-port=${SNMPPORT}
|
||||||
|
... --snmp-community=network/fortinet/fortigate/snmp/fortinet-fortigate
|
||||||
|
... --snmp-timeout=10
|
||||||
|
... --snmp-retries=3
|
||||||
|
... ${extra_options}
|
||||||
|
|
||||||
|
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||||
|
|
||||||
|
Examples: tc extra_options expected_result --
|
||||||
|
... 1 --filter-vdom='root' OK: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up - traffic traffic-in : Buffer creation, traffic-out : Buffer creation, traffic-bi : Buffer creation - latency: 8.617ms - jitter: 0.065ms - packet loss: 0.000% | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
||||||
|
... 2 --unknown-status='\\\%{vdom} eq "root"' UNKNOWN: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
||||||
|
... 3 --warning-status='\\\%{state} eq "up"' WARNING: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.in.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.out.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.bi.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
||||||
|
... 4 --critical-status='\\\%{state} eq "up"' CRITICAL: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.in.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.out.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.bi.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
||||||
|
... 5 --critical-status='\\\%{vdom} eq "root"' --warning-traffic-in=0 --critical-traffic-in=8 CRITICAL: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.in.bitspersecond'=0.00b/s;0:0;0:8;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.out.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.bi.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
||||||
|
... 6 ${EMPTY} OK: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up - traffic in: 0.00 b/s, out: 0.00 b/s, bi: 0.00 b/s - latency: 8.617ms - jitter: 0.065ms - packet loss: 0.000% | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.in.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.out.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.bi.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
||||||
|
... 7 --warning-status='\\\%{vdom} eq "root"' --warning-latency=8 --critical-latency=16 WARNING: sd-wan 'fgVWLHealthCheckLinkName' [vdom: root] [interface: wan1] state: up - latency: 8.617ms | 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.in.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.out.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.traffic.bi.bitspersecond'=0.00b/s;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.latency.milliseconds'=8.62ms;0:8;0:16;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.jitter.milliseconds'=0.07ms;;;0; 'root~fgVWLHealthCheckLinkName~wan1#sdwan.packetloss.percentage'=0.000%;;;0;100
|
@ -192,6 +192,7 @@ out-fc-wait
|
|||||||
out-mcast
|
out-mcast
|
||||||
out-ucast
|
out-ucast
|
||||||
overprovisioning
|
overprovisioning
|
||||||
|
packetloss
|
||||||
partiallyActive
|
partiallyActive
|
||||||
--patch-redhat
|
--patch-redhat
|
||||||
perfdata
|
perfdata
|
||||||
@ -260,6 +261,7 @@ userpass
|
|||||||
--use-ucd
|
--use-ucd
|
||||||
v1
|
v1
|
||||||
v2
|
v2
|
||||||
|
vdom
|
||||||
VDSL2
|
VDSL2
|
||||||
Veeam
|
Veeam
|
||||||
VeloCloud
|
VeloCloud
|
||||||
|
Loading…
x
Reference in New Issue
Block a user