Update vpn.pm to add IPSec Tunnel Counter #5382
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add counter for IPSec tunnels and remove default to CRITICAL if one tunnel is down.
Community contributors
Description
Reopen #5341 as I have closed it by accident
Add a counter for IPSec tunnels on Fortigate firewalls.
With this counter it is possible to check the current available IPSec tunnels and set the status to WARNING or CRITICAL on the count.
Added to the output IPSec tunnels state up: 2 in the global sections.
Full output:
OK: Virtual domain 'root' Logged users: 0, Active web sessions: 0, Active tunnels: 0, IPSec tunnels state up: 2 - All vpn are ok | 'root#vpn.users.logged.count'=0users;;;0; 'root#vpn.websessions.active.count'=0sessions;;;0; 'root#vpn.tunnels.active.count'=0tunnels;;;0; 'root#vpn.ipsec.tunnels.state.count'=2tunnels;@1:1;@0:0;0; 'root~t_hub1-1_111#vpn.traffic.in.bitspersecond'=1077.27b/s;;;0; 'root~t_hub1-1_111#vpn.traffic.out.bitspersecond'=1206.72b/s;;;0; 'root~t_hub2-1_111#vpn.traffic.in.bitspersecond'=1076.06b/s;;;0; 'root~t_hub2-1_111#vpn.traffic.out.bitspersecond'=1205.12b/s;;;0;
Type of change
How this pull request can be tested ?
Run
`
perl src/centreon_plugins.pl --plugin=network::fortinet::fortigate::snmp::plugin
--mode vpn
--hostname firewall-cluster.example.com
--snmp-version 3
--snmp-username='SNMP-User1'
--authpassphrase='secret1'
--authprotocol='SHA'
--privpassphrase='secret2'
--privprotocol='AES'
--warning-ipsec_tunnels_count='@1:1'
--critical-ipsec_tunnels_count='@0:0'
--use-new-perfdata
--filter-vpn='_11'
Debug information
I have run with --debug option and attached the snmp data from it.
debug.run.snmp.data.txt
Attached are also the MIB files from Fortigate and and extract of the used one with PRTG MIB-Browser.
Fortigate.MIBs.zip
Checklist