2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

OID to MIB changed

This commit is contained in:
Thomas Diener 2012-01-22 21:44:37 +01:00
parent 932b38d086
commit ce8b1121ec

View File

@ -11,6 +11,7 @@
# June, 1991.
#
# Version: v1.00 30.10.2011 First draft of the fortigate plugin
# v1.01 19.01.2012 OID to MIB changed, plugins gets faster
#
# Parameters: config (required)
# autoconf (optional)
@ -27,6 +28,10 @@
# Fortigate Activate snmp on your Fortigate firewall. Fortigate documentation
# at https://support.fortinet.com
#
# MIB Download and copy the Fortigate MIB defintion file to
# /usr/share/snmp/mibs/FORTINET-300-MIB.txt (Filename depends on
# used Version)
#
# Tested with Fortinet Fortigate-50B, Firmware 3.00(MR6) on Ubuntu 10.04 LTS
# with Munin 1.4.4 installed.
#
@ -38,18 +43,22 @@
### Constants ------------------------------------------------------------------
SNMPCLIENT=`basename $0 | sed 's/^snmp_//g' | cut -d "_" -f1`
SNMPGET="/usr/bin/snmpget -c $community -v 2c $SNMPCLIENT"
MIBFILE="/usr/share/snmp/mibs/FORTINET-300-MIB.20080414.txt"
FNTYPE=`echo $MIBFILE | cut -d "." -f1 | cut -d "/" -f6`
SNMPGET="/usr/bin/snmpget -m $MIBFILE -c $community -v 2c $SNMPCLIENT"
### Variables ------------------------------------------------------------------
fnSysVersion="1.3.6.1.4.1.12356.1.3.0"
FGTcpu="1.3.6.1.4.1.12356.1.8.0"
fnSysVersion="1.3.6.1.4.1.12356.1.3.0"
fnSysMemUsage="1.3.6.1.4.1.12356.1.9.0"
fnSysSesCount="1.3.6.1.4.1.12356.1.10.0"
fnVPNSslStatsLoginUsers="1.3.6.1.4.1.12356.9.5.1.3.1"
fnVPNSslStatsActiveWebSessions="1.3.6.1.4.1.12356.9.5.1.5.1"
fnVPNSslStatsActiveTunnels="1.3.6.1.4.1.12356.9.5.1.7.1"
FGTcpu="$FNTYPE::fnSysCpuUsage.0"
fnSysVersion="$FNTYPE::fnSysVersion.0"
fnSysMemUsage="$FNTYPE::fnSysMemUsage.0"
fnSysSesCount="$FNTYPE::fnSysSesCount.0"
fnVPNSslStatsLoginUsers="$FNTYPE::fnVpnSslStatsLoginUsers.1"
fnVPNSslStatsActiveWebSessions="$FNTYPE::fnVpnSslStatsActiveWebSessions.1"
fnVPNSslStatsActiveTunnels="$FNTYPE::fnVpnSslStatsActiveTunnels.1"
mibfile="/usr/share/snmp/mibs/FORTINET-300-MIB.20080414.txt"
UNIT=`$SNMPGET $fnSysVersion | cut -d ":" -f4 | cut -d " " -f2 | cut -d "\"" -f2`
SCPU=`$SNMPGET $FGTcpu | cut -d ":" -f4 | cut -d " " -f2`
SMEM=`$SNMPGET $fnSysMemUsage | cut -d ":" -f4 | cut -d " " -f2`