From bca7591084a1d2a444c3e2cbaf18e754252c893e Mon Sep 17 00:00:00 2001 From: mprins-RAM <115783288+mprins-RAM@users.noreply.github.com> Date: Fri, 4 Nov 2022 16:41:06 +0100 Subject: [PATCH] Added Fortigate SD-WAN Health checks (#14456) * Added Fortigate SD-WAN Health checks * Add unit test * Fix for displaying user description when F2A isnt used * Revert "Fix for displaying user description when F2A isnt used" This reverts commit d9f170d7e600559e17970c0f6855b35bf4f76a88. * Fix for displaying user description when F2A isnt used * Fixing comments * Requested changes, with modified tests * adding the correct tests * fix tests * fix tests * Testing issue resolved * fixing tests --- includes/definitions/discovery/fortigate.yaml | 27 +- tests/data/fortigate_sdwan.json | 899 ++++++++++++++++++ tests/snmpsim/fortigate_sdwan.snmprec | 113 +++ 3 files changed, 1036 insertions(+), 3 deletions(-) create mode 100644 tests/data/fortigate_sdwan.json create mode 100644 tests/snmpsim/fortigate_sdwan.snmprec diff --git a/includes/definitions/discovery/fortigate.yaml b/includes/definitions/discovery/fortigate.yaml index bfdf515b19..4af43281e1 100644 --- a/includes/definitions/discovery/fortigate.yaml +++ b/includes/definitions/discovery/fortigate.yaml @@ -62,7 +62,6 @@ modules: states: - { value: 1, descr: Disabled, graph: 1, generic: 3 } - { value: 2, descr: Enabled, graph: 1, generic: 0 } - - oid: fdLteSessConnStat num_oid: '.1.3.6.1.4.1.12356.101.19.5.1.1.4.{{ $index }}' @@ -76,7 +75,16 @@ modules: - { value: 2, descr: Connected, graph: 1, generic: 0 } - { value: 3, descr: Suspended, graph: 1, generic: 2 } - { value: 4, descr: Authenticating, graph: 1, generic: 1 } - + - + oid: fgVWLHealthCheckLinkTable + value: fgVWLHealthCheckLinkState + num_oid: '.1.3.6.1.4.1.12356.101.4.9.2.1.4.{{ $index }}' + descr: '{{ $fgVWLHealthCheckLinkName }}\{{ $fgVWLHealthCheckLinkIfName }}' + group: SD-Wan + index: 'fgVWLHealthCheckLinkState.{{ $index }}' + states: + - { descr: Alive, graph: 1, value: 0, generic: 0 } + - { descr: Dead, graph: 0, value: 1, generic: 2 } count: data: - @@ -97,7 +105,20 @@ modules: index: 'fgVpnSslStatsActiveTunnels.{{ $index }}' descr: SSL VPN Active tunnels group: VPN - + - + oid: fgVWLHealthCheckLinkTable + value: fgVWLHealthCheckLinkLatency + num_oid: '.1.3.6.1.4.1.12356.101.4.9.2.1.5.{{ $index }}' + descr: 'Link Latency {{ $fgVWLHealthCheckLinkName }}\{{ $fgVWLHealthCheckLinkIfName }}' + group: SD-WAN + index: 'fgVWLHealthCheckLinkLatency.{{ $index }}' + - + oid: fgVWLHealthCheckLinkTable + value: fgVWLHealthCheckLinkJitter + num_oid: '.1.3.6.1.4.1.12356.101.4.9.2.1.6.{{ $index }}' + descr: 'Link Jitter {{ $fgVWLHealthCheckLinkName }}\{{ $fgVWLHealthCheckLinkIfName }}' + group: SD-WAN + index: 'fgVWLHealthCheckLinkJitter.{{ $index }}' signal: data: diff --git a/tests/data/fortigate_sdwan.json b/tests/data/fortigate_sdwan.json new file mode 100644 index 0000000000..022684941a --- /dev/null +++ b/tests/data/fortigate_sdwan.json @@ -0,0 +1,899 @@ +{ + "os": { + "discovery": { + "devices": [ + { + "sysName": null, + "sysObjectID": ".1.3.6.1.4.1.12356.15", + "sysDescr": null, + "sysContact": null, + "version": "v7.0.6,build0366,220606 (GA.F)", + "hardware": null, + "features": null, + "location": null, + "os": "fortigate", + "type": "firewall", + "serial": null, + "icon": "fortinet.svg" + } + ] + }, + "poller": "matches discovery" + }, + "processors": { + "discovery": { + "processors": [ + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.12356.101.4.1.3.0", + "processor_index": "0", + "processor_type": "fortigate-fixed", + "processor_usage": 0, + "processor_descr": "System Cpu Usage", + "processor_precision": 1, + "processor_perc_warn": 75 + }, + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.12356.101.4.4.2.1.2.1", + "processor_index": "1", + "processor_type": "fortigate-core", + "processor_usage": 0, + "processor_descr": "CPU Core 1", + "processor_precision": 1, + "processor_perc_warn": 75 + }, + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.12356.101.4.4.2.1.2.2", + "processor_index": "2", + "processor_type": "fortigate-core", + "processor_usage": 1, + "processor_descr": "CPU Core 2", + "processor_precision": 1, + "processor_perc_warn": 75 + }, + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.12356.101.4.4.2.1.2.3", + "processor_index": "3", + "processor_type": "fortigate-core", + "processor_usage": 9, + "processor_descr": "CPU Core 3", + "processor_precision": 1, + "processor_perc_warn": 75 + }, + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.12356.101.4.4.2.1.2.4", + "processor_index": "4", + "processor_type": "fortigate-core", + "processor_usage": 0, + "processor_descr": "CPU Core 4", + "processor_precision": 1, + "processor_perc_warn": 75 + }, + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.12356.101.4.4.2.1.2.5", + "processor_index": "5", + "processor_type": "fortigate-core", + "processor_usage": 0, + "processor_descr": "CPU Core 5", + "processor_precision": 1, + "processor_perc_warn": 75 + } + ] + }, + "poller": "matches discovery" + }, + "mempools": { + "discovery": { + "mempools": [ + { + "mempool_index": "0", + "entPhysicalIndex": null, + "mempool_type": "fortigate", + "mempool_class": "system", + "mempool_precision": 1024, + "mempool_descr": "Main Memory", + "mempool_perc": 60, + "mempool_perc_oid": ".1.3.6.1.4.1.12356.101.4.1.4.0", + "mempool_used": 1174241280, + "mempool_used_oid": null, + "mempool_free": 782827520, + "mempool_free_oid": null, + "mempool_total": 1957068800, + "mempool_total_oid": null, + "mempool_largestfree": null, + "mempool_lowestfree": null, + "mempool_deleted": 0, + "mempool_perc_warn": 90 + } + ] + }, + "poller": "matches discovery" + }, + "sensors": { + "discovery": { + "sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.12.2.3.1.6.1", + "sensor_index": "fgVpnSslStatsActiveTunnels.1", + "sensor_type": "fortigate", + "sensor_descr": "SSL VPN Active tunnels", + "group": "VPN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.12.2.3.1.2.1", + "sensor_index": "fgVpnSslStatsLoginUsers.1", + "sensor_type": "fortigate", + "sensor_descr": "SSL VPN Logged users", + "group": "VPN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.12.1.1.0", + "sensor_index": "fgVpnTunnelUpCount.0", + "sensor_type": "fortigate", + "sensor_descr": "IPSEC VPN tunnels", + "group": "VPN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.6.1", + "sensor_index": "fgVWLHealthCheckLinkJitter.1", + "sensor_type": "fortigate", + "sensor_descr": "Link Jitter Default_Office_365\\wan1", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0.168, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.6.2", + "sensor_index": "fgVWLHealthCheckLinkJitter.2", + "sensor_type": "fortigate", + "sensor_descr": "Link Jitter Default_Office_365\\wan2", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4.482, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.6.3", + "sensor_index": "fgVWLHealthCheckLinkJitter.3", + "sensor_type": "fortigate", + "sensor_descr": "Link Jitter PRIVATE_CONNECTION\\PRIVATE-A", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0.125, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.6.4", + "sensor_index": "fgVWLHealthCheckLinkJitter.4", + "sensor_type": "fortigate", + "sensor_descr": "Link Jitter PRIVATE_CONNECTION\\PRIVATE-B", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4.713, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.6.5", + "sensor_index": "fgVWLHealthCheckLinkJitter.5", + "sensor_type": "fortigate", + "sensor_descr": "Link Jitter CloudflareDNS\\wan1", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0.613, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.6.6", + "sensor_index": "fgVWLHealthCheckLinkJitter.6", + "sensor_type": "fortigate", + "sensor_descr": "Link Jitter CloudflareDNS\\wan2", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 3.409, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.5.1", + "sensor_index": "fgVWLHealthCheckLinkLatency.1", + "sensor_type": "fortigate", + "sensor_descr": "Link Latency Default_Office_365\\wan1", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2.403, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.5.2", + "sensor_index": "fgVWLHealthCheckLinkLatency.2", + "sensor_type": "fortigate", + "sensor_descr": "Link Latency Default_Office_365\\wan2", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 25.03, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.5.3", + "sensor_index": "fgVWLHealthCheckLinkLatency.3", + "sensor_type": "fortigate", + "sensor_descr": "Link Latency PRIVATE_CONNECTION\\PRIVATE-A", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2.628, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.5.4", + "sensor_index": "fgVWLHealthCheckLinkLatency.4", + "sensor_type": "fortigate", + "sensor_descr": "Link Latency PRIVATE_CONNECTION\\PRIVATE-B", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 31.206, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.5.5", + "sensor_index": "fgVWLHealthCheckLinkLatency.5", + "sensor_type": "fortigate", + "sensor_descr": "Link Latency CloudflareDNS\\wan1", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4.333, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.5.6", + "sensor_index": "fgVWLHealthCheckLinkLatency.6", + "sensor_type": "fortigate", + "sensor_descr": "Link Latency CloudflareDNS\\wan2", + "group": "SD-WAN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 25.961, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.1.8.0", + "sensor_index": "fgSysSesCount.0", + "sensor_type": "sessions", + "sensor_descr": "Session count", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 671, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.1.11.0", + "sensor_index": "fgSysSesRate1.0", + "sensor_type": "sessions", + "sensor_descr": "Sessions/sec 1m avg", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 9, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.1.12.0", + "sensor_index": "fgSysSesRate10.0", + "sensor_type": "sessions", + "sensor_descr": "Sessions/sec 10m avg", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.1.13.0", + "sensor_index": "fgSysSesRate30.0", + "sensor_type": "sessions", + "sensor_descr": "Sessions/sec 30m avg", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 3, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.1.14.0", + "sensor_index": "fgSysSesRate60.0", + "sensor_type": "sessions", + "sensor_descr": "Sessions/sec 60m avg", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 3, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.12.2.3.1.1.1", + "sensor_index": "fgVpnSslState.1", + "sensor_type": "fgVpnSslState", + "sensor_descr": "SSL-VPN Status", + "group": "SSL VPN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 1, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVpnSslState" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.12.2.2.1.20.1.1", + "sensor_index": "fgVpnTunEntIndex.1.1", + "sensor_type": "fgVpnTunEntStatus", + "sensor_descr": "PRIVATE-A\\PRIVATE-A01 (198.18.0.1)", + "group": "IPSEC VPN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVpnTunEntStatus" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.12.2.2.1.20.2.1", + "sensor_index": "fgVpnTunEntIndex.2.1", + "sensor_type": "fgVpnTunEntStatus", + "sensor_descr": "PRIVATE-B\\PRIVATE-B01 (198.18.1.1)", + "group": "IPSEC VPN", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 2, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVpnTunEntStatus" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.4.1", + "sensor_index": "fgVWLHealthCheckLinkState.1", + "sensor_type": "fgVWLHealthCheckLinkTable", + "sensor_descr": "Default_Office_365\\wan1", + "group": "SD-Wan", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVWLHealthCheckLinkTable" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.4.2", + "sensor_index": "fgVWLHealthCheckLinkState.2", + "sensor_type": "fgVWLHealthCheckLinkTable", + "sensor_descr": "Default_Office_365\\wan2", + "group": "SD-Wan", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVWLHealthCheckLinkTable" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.4.3", + "sensor_index": "fgVWLHealthCheckLinkState.3", + "sensor_type": "fgVWLHealthCheckLinkTable", + "sensor_descr": "PRIVATE_CONNECTION\\PRIVATE-A", + "group": "SD-Wan", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVWLHealthCheckLinkTable" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.4.4", + "sensor_index": "fgVWLHealthCheckLinkState.4", + "sensor_type": "fgVWLHealthCheckLinkTable", + "sensor_descr": "PRIVATE_CONNECTION\\PRIVATE-B", + "group": "SD-Wan", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVWLHealthCheckLinkTable" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.4.5", + "sensor_index": "fgVWLHealthCheckLinkState.5", + "sensor_type": "fgVWLHealthCheckLinkTable", + "sensor_descr": "CloudflareDNS\\wan1", + "group": "SD-Wan", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVWLHealthCheckLinkTable" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.12356.101.4.9.2.1.4.6", + "sensor_index": "fgVWLHealthCheckLinkState.6", + "sensor_type": "fgVWLHealthCheckLinkTable", + "sensor_descr": "CloudflareDNS\\wan2", + "group": "SD-Wan", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "rrd_type": "GAUGE", + "state_name": "fgVWLHealthCheckLinkTable" + } + ], + "state_indexes": [ + { + "state_name": "fgVpnSslState", + "state_descr": "Disabled", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 3 + }, + { + "state_name": "fgVpnSslState", + "state_descr": "Enabled", + "state_draw_graph": 1, + "state_value": 2, + "state_generic_value": 0 + }, + { + "state_name": "fgVpnTunEntStatus", + "state_descr": "Down", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "fgVpnTunEntStatus", + "state_descr": "Up", + "state_draw_graph": 1, + "state_value": 2, + "state_generic_value": 0 + }, + { + "state_name": "fgVWLHealthCheckLinkTable", + "state_descr": "Alive", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "fgVWLHealthCheckLinkTable", + "state_descr": "Dead", + "state_draw_graph": 0, + "state_value": 1, + "state_generic_value": 2 + } + ] + }, + "poller": "matches discovery" + } +} diff --git a/tests/snmpsim/fortigate_sdwan.snmprec b/tests/snmpsim/fortigate_sdwan.snmprec new file mode 100644 index 0000000000..b8cefad9c1 --- /dev/null +++ b/tests/snmpsim/fortigate_sdwan.snmprec @@ -0,0 +1,113 @@ +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.12356.15 +1.3.6.1.4.1.12356.101.4.1.1.0|4|v7.0.6,build0366,220606 (GA.F) +1.3.6.1.4.1.12356.101.4.1.3.0|66|0 +1.3.6.1.4.1.12356.101.4.1.4.0|66|60 +1.3.6.1.4.1.12356.101.4.1.5.0|66|1911200 +1.3.6.1.4.1.12356.101.4.1.8.0|66|671 +1.3.6.1.4.1.12356.101.4.1.11.0|66|9 +1.3.6.1.4.1.12356.101.4.1.12.0|66|4 +1.3.6.1.4.1.12356.101.4.1.13.0|66|3 +1.3.6.1.4.1.12356.101.4.1.14.0|66|3 +1.3.6.1.4.1.12356.101.4.3.1.0|2|0 +1.3.6.1.4.1.12356.101.4.4.2.1.2.1|66|0 +1.3.6.1.4.1.12356.101.4.4.2.1.2.2|66|1 +1.3.6.1.4.1.12356.101.4.4.2.1.2.3|66|9 +1.3.6.1.4.1.12356.101.4.4.2.1.2.4|66|0 +1.3.6.1.4.1.12356.101.4.4.2.1.2.5|66|0 +1.3.6.1.4.1.12356.101.4.9.2.1.1.1|2|1 +1.3.6.1.4.1.12356.101.4.9.2.1.1.2|2|2 +1.3.6.1.4.1.12356.101.4.9.2.1.1.3|2|3 +1.3.6.1.4.1.12356.101.4.9.2.1.1.4|2|4 +1.3.6.1.4.1.12356.101.4.9.2.1.1.5|2|5 +1.3.6.1.4.1.12356.101.4.9.2.1.1.6|2|6 +1.3.6.1.4.1.12356.101.4.9.2.1.2.1|4|Default_Office_365 +1.3.6.1.4.1.12356.101.4.9.2.1.2.2|4|Default_Office_365 +1.3.6.1.4.1.12356.101.4.9.2.1.2.3|4|PRIVATE_CONNECTION +1.3.6.1.4.1.12356.101.4.9.2.1.2.4|4|PRIVATE_CONNECTION +1.3.6.1.4.1.12356.101.4.9.2.1.2.5|4|CloudflareDNS +1.3.6.1.4.1.12356.101.4.9.2.1.2.6|4|CloudflareDNS +1.3.6.1.4.1.12356.101.4.9.2.1.3.1|66|2 +1.3.6.1.4.1.12356.101.4.9.2.1.3.2|66|1 +1.3.6.1.4.1.12356.101.4.9.2.1.3.3|66|3 +1.3.6.1.4.1.12356.101.4.9.2.1.3.4|66|4 +1.3.6.1.4.1.12356.101.4.9.2.1.3.5|66|2 +1.3.6.1.4.1.12356.101.4.9.2.1.3.6|66|1 +1.3.6.1.4.1.12356.101.4.9.2.1.4.1|2|0 +1.3.6.1.4.1.12356.101.4.9.2.1.4.2|2|0 +1.3.6.1.4.1.12356.101.4.9.2.1.4.3|2|0 +1.3.6.1.4.1.12356.101.4.9.2.1.4.4|2|0 +1.3.6.1.4.1.12356.101.4.9.2.1.4.5|2|0 +1.3.6.1.4.1.12356.101.4.9.2.1.4.6|2|0 +1.3.6.1.4.1.12356.101.4.9.2.1.5.1|4|2.403 +1.3.6.1.4.1.12356.101.4.9.2.1.5.2|4|25.030 +1.3.6.1.4.1.12356.101.4.9.2.1.5.3|4|2.628 +1.3.6.1.4.1.12356.101.4.9.2.1.5.4|4|31.206 +1.3.6.1.4.1.12356.101.4.9.2.1.5.5|4|4.333 +1.3.6.1.4.1.12356.101.4.9.2.1.5.6|4|25.961 +1.3.6.1.4.1.12356.101.4.9.2.1.6.1|4|0.168 +1.3.6.1.4.1.12356.101.4.9.2.1.6.2|4|4.482 +1.3.6.1.4.1.12356.101.4.9.2.1.6.3|4|0.125 +1.3.6.1.4.1.12356.101.4.9.2.1.6.4|4|4.713 +1.3.6.1.4.1.12356.101.4.9.2.1.6.5|4|0.613 +1.3.6.1.4.1.12356.101.4.9.2.1.6.6|4|3.409 +1.3.6.1.4.1.12356.101.4.9.2.1.7.1|70|4879730 +1.3.6.1.4.1.12356.101.4.9.2.1.7.2|70|4879730 +1.3.6.1.4.1.12356.101.4.9.2.1.7.3|70|4879742 +1.3.6.1.4.1.12356.101.4.9.2.1.7.4|70|4879742 +1.3.6.1.4.1.12356.101.4.9.2.1.7.5|70|9653490 +1.3.6.1.4.1.12356.101.4.9.2.1.7.6|70|9653490 +1.3.6.1.4.1.12356.101.4.9.2.1.8.1|70|4876514 +1.3.6.1.4.1.12356.101.4.9.2.1.8.2|70|4875989 +1.3.6.1.4.1.12356.101.4.9.2.1.8.3|70|4878061 +1.3.6.1.4.1.12356.101.4.9.2.1.8.4|70|4875875 +1.3.6.1.4.1.12356.101.4.9.2.1.8.5|70|9652759 +1.3.6.1.4.1.12356.101.4.9.2.1.8.6|70|9646568 +1.3.6.1.4.1.12356.101.4.9.2.1.9.1|4|0.000 +1.3.6.1.4.1.12356.101.4.9.2.1.9.2|4|2.000 +1.3.6.1.4.1.12356.101.4.9.2.1.9.3|4|0.000 +1.3.6.1.4.1.12356.101.4.9.2.1.9.4|4|0.000 +1.3.6.1.4.1.12356.101.4.9.2.1.9.5|4|0.000 +1.3.6.1.4.1.12356.101.4.9.2.1.9.6|4|0.000 +1.3.6.1.4.1.12356.101.4.9.2.1.10.1|4|root +1.3.6.1.4.1.12356.101.4.9.2.1.10.2|4|root +1.3.6.1.4.1.12356.101.4.9.2.1.10.3|4|root +1.3.6.1.4.1.12356.101.4.9.2.1.10.4|4|root +1.3.6.1.4.1.12356.101.4.9.2.1.10.5|4|root +1.3.6.1.4.1.12356.101.4.9.2.1.10.6|4|root +1.3.6.1.4.1.12356.101.4.9.2.1.11.1|65|204627 +1.3.6.1.4.1.12356.101.4.9.2.1.11.2|65|81917 +1.3.6.1.4.1.12356.101.4.9.2.1.11.3|65|204695 +1.3.6.1.4.1.12356.101.4.9.2.1.11.4|65|81920 +1.3.6.1.4.1.12356.101.4.9.2.1.11.5|65|204627 +1.3.6.1.4.1.12356.101.4.9.2.1.11.6|65|81917 +1.3.6.1.4.1.12356.101.4.9.2.1.12.1|65|204709 +1.3.6.1.4.1.12356.101.4.9.2.1.12.2|65|81917 +1.3.6.1.4.1.12356.101.4.9.2.1.12.3|65|204738 +1.3.6.1.4.1.12356.101.4.9.2.1.12.4|65|81920 +1.3.6.1.4.1.12356.101.4.9.2.1.12.5|65|204709 +1.3.6.1.4.1.12356.101.4.9.2.1.12.6|65|81917 +1.3.6.1.4.1.12356.101.4.9.2.1.13.1|65|409336 +1.3.6.1.4.1.12356.101.4.9.2.1.13.2|65|163834 +1.3.6.1.4.1.12356.101.4.9.2.1.13.3|65|409433 +1.3.6.1.4.1.12356.101.4.9.2.1.13.4|65|163840 +1.3.6.1.4.1.12356.101.4.9.2.1.13.5|65|409336 +1.3.6.1.4.1.12356.101.4.9.2.1.13.6|65|163834 +1.3.6.1.4.1.12356.101.4.9.2.1.14.1|4|wan1 +1.3.6.1.4.1.12356.101.4.9.2.1.14.2|4|wan2 +1.3.6.1.4.1.12356.101.4.9.2.1.14.3|4|PRIVATE-A +1.3.6.1.4.1.12356.101.4.9.2.1.14.4|4|PRIVATE-B +1.3.6.1.4.1.12356.101.4.9.2.1.14.5|4|wan1 +1.3.6.1.4.1.12356.101.4.9.2.1.14.6|4|wan2 +1.3.6.1.4.1.12356.101.12.1.1.0|2|2 +1.3.6.1.4.1.12356.101.12.2.2.1.2.1.1|4|PRIVATE-A +1.3.6.1.4.1.12356.101.12.2.2.1.2.2.1|4|PRIVATE-B +1.3.6.1.4.1.12356.101.12.2.2.1.3.1.1|4|PRIVATE-A01 +1.3.6.1.4.1.12356.101.12.2.2.1.3.2.1|4|PRIVATE-B01 +1.3.6.1.4.1.12356.101.12.2.2.1.4.1.1|64|198.18.0.1 +1.3.6.1.4.1.12356.101.12.2.2.1.4.2.1|64|198.18.1.1 +1.3.6.1.4.1.12356.101.12.2.2.1.20.1.1|2|2 +1.3.6.1.4.1.12356.101.12.2.2.1.20.2.1|2|2 +1.3.6.1.4.1.12356.101.12.2.3.1.1.1|2|1 +1.3.6.1.4.1.12356.101.12.2.3.1.2.1|66|0 +1.3.6.1.4.1.12356.101.12.2.3.1.6.1|66|0 +1.3.6.1.4.1.12356.101.13.1.1.0|2|1