
Fortinet
Check Fortigate Status
Description:
This script is a modification of “Check Fortigate CPU load” (or check_fortigate_cpu.pl).
I have modified it to work with our models (200A and 80C).
Perhaps someone will find it useful.
It works for CPU and RAM usage, as well as active sessions.
Performance data is also produced.
Current Version
1.0
Last Release Date
2012-02-24
Compatible With
- Nagios 3.x
Owner
Project Files
File | Description |
---|---|
check_fortigate_status |
Project Notes
For this script to work, SNMP needs to be enabled in your FortiGate config, both for the appropriate network interface and in the Config section.
The community name should be "public".
The "snmp" package should also be installed on the Linux side of things.
Usage: check_fortigate_status -H host -m mode [-C community] [-M X] [-w XX] [-c XX]
Options:
-H, --host hostname (or IP address)
Check interface on the indicated host.
-m, --mode STRING
What to check
Valid values are:
cpu Returns CPU usage
memory Returns memory usage
sessions Returns the number of active IP sessions
-C, --community STRING
SNMP community string
Default: public
-M, --modus X
0: Just monitor, no alarms
1: Threshold excesses will cause alarms
Default: 2
-w, --warn XX
Nagios warning threshold
Percent value for "memory" and "cpu" modes
Default: 80%
Integer value for "sessions" mode
Default: 1500
-c, --crit XX
Nagios critical threshold
Percent value for "memory" and "cpu" modes
Default: 90%
Integer value for "sessions" mode
Default: 2000
Reviews
(2)
Add a Review
Great script
I changed the OIDs in order to get it functional for my FG200B.
cpu= .1.3.6.1.4.1.12356.101.4.1.3.0
mem= .1.3.6.1.4.1.12356.101.4.1.4.0
ses= .1.3.6.1.4.1.12356.101.4.1.8.0
This script works perfectly for our fortigates.
It did need a fix concerning the sessions-argument.
If you comment out the following two lines you can use the -w and -c options with -m sessions, else it will keep using the default of 1500 (which I don't want to use)
} elsif ($mode =~ "ses") {
@sesArray = split(" ", $snmpCommand);
$usage = @sesArray[-1];
# $warn = "1500";
# $crit = "2000";
$usagestring = "Active IP Sessions";
I'm no perl programmer so don't know exactly why this isn't working. Maybe the author can fix this :)
Thanks for your script.
Page Sections
Project Stats
Rating
4.7 (3)
Favorites
0
Views
94,413