Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_f5
0.2
2012-11-19
- Nagios 2.x
- Nagios 3.x
- Nagios XI
GPL
59644
File | Description |
---|---|
check_f5.pl | Version 0.1 |
check_f5.pl | Version 0.2 |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Perl script; requires Net::SNMP to work; Data::Dumper also needed if using the caching mode.
Use check_f5.pl -h for full syntax and usage.
Version 0.2 corrects an issue with Perl 5.10 support.
Usage: ./check_f5.pl -H host [-C community] [-d][-h][-M][-t timout]
[--no-perf] [--no-optimise]
[-f cachefile] [-x cacheexpiretime]
[-m modules]
-H --host : Specify F5 hostname (f5)
Can be used multiple times; the first to answer is used.
-C --community : Specify SNMP community string (public)
-d --debug : Debug mode. Use multiple times for more detail
-h --help : Show help
-M --mrtg : MRTG mode. Also --no-mrtg for Nagios mode.
-t --timeout : SNMP query timeout (10)
-f --cache-file : File basename for SNMP cache (/tmp/f5.cache)
-x --cache-expire : Seconds before cache becomes invalid (290)
--no-perf : Disable perfstats in Nagios output
--no-optimise : Retrieve entire SNMP tree for tables (use in conjunction
with cache if many separate server() checks being done)
-m --modules : List modules to enable. Space separated. Can be used
multiple times if required. See below.
MRTG mode
In MRTG mode, only the first module to provide a metric will be output.
Available modules:
cpu[:n][(warnpc,critpc)] MRTG: user and idle percent (80,90)
mem[ory][:percent][(warnpc,critpc)] MRTG: used and total bytes (or %) (80,90)
temp[erature][(warn,crit)]
fan No MRTG output
psu No MRTG output
health Same as 'cpu mem temp fan psu'
ssl[:server][(activewarn,activecrit)] MRTG: active and total SSL (500,400)
traffic[:server] MRTG: bytes in/out. No Nagios.
server:name[(actvw,actvc)] For virt server name (500,400)
server:ipaddr[:port][(actvw,actvc)] For virt server ipaddr:port
server[(actvw,actvc)] Over ALL virtual servers (50000,40000)
cert[ificate][:certname][([warn,]crit)] Check certificate days left, no MRTG
conn[ections][(actvw,actvc)] same as 'server'
group Failover health. No MRTG output.
cm Same as 'group'
cache No output; prepare SNMP cache
Server checks:
For server checks, the number of active connections will be thresholded.
Next, the availability of the Server will be checked and will return WARN if
not all the active pool members are available.
Examples:
./check_f5.pl -H myf5 -C public -m 'cpu(80,90) server:/Production/foobar'
./check_f5.pl -H myf5 -m 'health certificates(14,7) conn(1500,2000)'
[--no-perf] [--no-optimise]
[-f cachefile] [-x cacheexpiretime]
[-m modules]
-H --host : Specify F5 hostname (f5)
Can be used multiple times; the first to answer is used.
-C --community : Specify SNMP community string (public)
-d --debug : Debug mode. Use multiple times for more detail
-h --help : Show help
-M --mrtg : MRTG mode. Also --no-mrtg for Nagios mode.
-t --timeout : SNMP query timeout (10)
-f --cache-file : File basename for SNMP cache (/tmp/f5.cache)
-x --cache-expire : Seconds before cache becomes invalid (290)
--no-perf : Disable perfstats in Nagios output
--no-optimise : Retrieve entire SNMP tree for tables (use in conjunction
with cache if many separate server() checks being done)
-m --modules : List modules to enable. Space separated. Can be used
multiple times if required. See below.
MRTG mode
In MRTG mode, only the first module to provide a metric will be output.
Available modules:
cpu[:n][(warnpc,critpc)] MRTG: user and idle percent (80,90)
mem[ory][:percent][(warnpc,critpc)] MRTG: used and total bytes (or %) (80,90)
temp[erature][(warn,crit)]
fan No MRTG output
psu No MRTG output
health Same as 'cpu mem temp fan psu'
ssl[:server][(activewarn,activecrit)] MRTG: active and total SSL (500,400)
traffic[:server] MRTG: bytes in/out. No Nagios.
server:name[(actvw,actvc)] For virt server name (500,400)
server:ipaddr[:port][(actvw,actvc)] For virt server ipaddr:port
server[(actvw,actvc)] Over ALL virtual servers (50000,40000)
cert[ificate][:certname][([warn,]crit)] Check certificate days left, no MRTG
conn[ections][(actvw,actvc)] same as 'server'
group Failover health. No MRTG output.
cm Same as 'group'
cache No output; prepare SNMP cache
Server checks:
For server checks, the number of active connections will be thresholded.
Next, the availability of the Server will be checked and will return WARN if
not all the active pool members are available.
Examples:
./check_f5.pl -H myf5 -C public -m 'cpu(80,90) server:/Production/foobar'
./check_f5.pl -H myf5 -m 'health certificates(14,7) conn(1500,2000)'
Reviews (4)
byflingo, September 23, 2015
This is the best plugin I've tested so far. Very flexible. Includes PerfData. Results are consistent w/ F5's Admin GUI!
bysharkbot, October 10, 2013
Thank you for this plugin. I've implemented it against a BigIP 3900 with version 10.2.3 Build 123.0 Hotfix HF1.
Using 0.2 CPU, Mem, Conn/Server, and Group modules all work nicely.
However Cert returns "Cannot determine expiry date for "
Also for Server: check, I execute ./check_f5 -H mylb -C mycommunity -m 'server:/Production/virtualservername' and get "/Production/virtualservername: Not enable (noSuchInstance)" Perhaps I am not understanding something.
Using 0.2 CPU, Mem, Conn/Server, and Group modules all work nicely.
However Cert returns "Cannot determine expiry date for "
Also for Server: check, I execute ./check_f5 -H mylb -C mycommunity -m 'server:/Production/virtualservername' and get "/Production/virtualservername: Not enable (noSuchInstance)" Perhaps I am not understanding something.
byvnlecaroz, July 12, 2013
Hi,
Im getting an error when executing this plugin:
./check_f5.pl
Not enough arguments for unpack at ./check_f5.pl line 159, near "'C' }"
Execution of ./check_f5.pl aborted due to compilation errors.
Even if i added the hostname, community string and modules, its still the same error.
Can you help me identify whats causing this. Thanks
Im getting an error when executing this plugin:
./check_f5.pl
Not enough arguments for unpack at ./check_f5.pl line 159, near "'C' }"
Execution of ./check_f5.pl aborted due to compilation errors.
Even if i added the hostname, community string and modules, its still the same error.
Can you help me identify whats causing this. Thanks
Looks promising.
Haven't been able to test this very much since I'm on very old 9.x for the most which gives:
Illegal division by zero at /opt/nagios/libexec/check_f5.pl line 619.
For v.10 and 1500 box it gives some issues around fans which I believe is incorrect. Also, default temperature thresholds might be a bit low.
snmpwalk -v2c test -c test .1.3.6.1.4.1.3375.2.1.3 -m all
F5-BIGIP-SYSTEM-MIB::sysCpuNumber.0 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysCpuIndex.1 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysCpuTemperature.1 = INTEGER: 43
F5-BIGIP-SYSTEM-MIB::sysCpuFanSpeed.1 = INTEGER: 6420
F5-BIGIP-SYSTEM-MIB::sysCpuEntry.4.1 = STRING: "cpu1"
F5-BIGIP-SYSTEM-MIB::sysCpuEntry.5.1 = INTEGER: 0
F5-BIGIP-SYSTEM-MIB::sysChassisFanNumber.0 = INTEGER: 6
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.101 = INTEGER: 101
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.102 = INTEGER: 102
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.103 = INTEGER: 103
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.104 = INTEGER: 104
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.105 = INTEGER: 105
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.106 = INTEGER: 106
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.101 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.102 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.103 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.104 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.105 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.106 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.101 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.102 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.103 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.104 = INTEGER: 9782
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.105 = INTEGER: 9642
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.106 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisPowerSupplyNumber.0 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysChassisPowerSupplyIndex.101 = INTEGER: 101
F5-BIGIP-SYSTEM-MIB::sysChassisPowerSupplyStatus.101 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisTempNumber.0 = INTEGER: 2
F5-BIGIP-SYSTEM-MIB::sysChassisTempIndex.1 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysChassisTempIndex.101 = INTEGER: 101
F5-BIGIP-SYSTEM-MIB::sysChassisTempTemperature.1 = INTEGER: 41
F5-BIGIP-SYSTEM-MIB::sysChassisTempTemperature.101 = INTEGER: 36
F5-BIGIP-SYSTEM-MIB::sysGeneralHwName.0 = STRING: C36
F5-BIGIP-SYSTEM-MIB::sysGeneralHwNumber.0 = STRING: deprecated
F5-BIGIP-SYSTEM-MIB::sysGeneralChassisSerialNum.0 = STRING: bip256156s
F5-BIGIP-SYSTEM-MIB::sysPlatform.5.1.0 = STRING: "C36"
F5-BIGIP-SYSTEM-MIB::sysPlatform.5.2.0 = STRING: "BIG-IP 1500"
./check_f5.pl -H test -C test
Checks FAILED. See details.|cpu_user=9%;80;90;0;100 cpu_idle=85%;20;10;0;100 mem_pc=1.77%;80;90;0;100 mem_used=26110896;1179438284;1326868070;0;1474297856
CPU average usage: 9% (idle 85%)
Memory usage 1.77%
Temperature sensor #2 has unknown status.
CRIT: Temp sensor #1 reads 41 >= 35
Unit fan #6 has failed.
Unit fan #5 has failed.
Unit fan #4 has failed.
Unit fan #3 has failed.
Unit fan #2 has failed.
Unit fan #1 has failed.
Unit PSU #1 has failed.
Haven't been able to test this very much since I'm on very old 9.x for the most which gives:
Illegal division by zero at /opt/nagios/libexec/check_f5.pl line 619.
For v.10 and 1500 box it gives some issues around fans which I believe is incorrect. Also, default temperature thresholds might be a bit low.
snmpwalk -v2c test -c test .1.3.6.1.4.1.3375.2.1.3 -m all
F5-BIGIP-SYSTEM-MIB::sysCpuNumber.0 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysCpuIndex.1 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysCpuTemperature.1 = INTEGER: 43
F5-BIGIP-SYSTEM-MIB::sysCpuFanSpeed.1 = INTEGER: 6420
F5-BIGIP-SYSTEM-MIB::sysCpuEntry.4.1 = STRING: "cpu1"
F5-BIGIP-SYSTEM-MIB::sysCpuEntry.5.1 = INTEGER: 0
F5-BIGIP-SYSTEM-MIB::sysChassisFanNumber.0 = INTEGER: 6
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.101 = INTEGER: 101
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.102 = INTEGER: 102
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.103 = INTEGER: 103
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.104 = INTEGER: 104
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.105 = INTEGER: 105
F5-BIGIP-SYSTEM-MIB::sysChassisFanIndex.106 = INTEGER: 106
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.101 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.102 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.103 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.104 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.105 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanStatus.106 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.101 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.102 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.103 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.104 = INTEGER: 9782
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.105 = INTEGER: 9642
F5-BIGIP-SYSTEM-MIB::sysChassisFanSpeed.106 = INTEGER: 9926
F5-BIGIP-SYSTEM-MIB::sysChassisPowerSupplyNumber.0 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysChassisPowerSupplyIndex.101 = INTEGER: 101
F5-BIGIP-SYSTEM-MIB::sysChassisPowerSupplyStatus.101 = INTEGER: good(1)
F5-BIGIP-SYSTEM-MIB::sysChassisTempNumber.0 = INTEGER: 2
F5-BIGIP-SYSTEM-MIB::sysChassisTempIndex.1 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysChassisTempIndex.101 = INTEGER: 101
F5-BIGIP-SYSTEM-MIB::sysChassisTempTemperature.1 = INTEGER: 41
F5-BIGIP-SYSTEM-MIB::sysChassisTempTemperature.101 = INTEGER: 36
F5-BIGIP-SYSTEM-MIB::sysGeneralHwName.0 = STRING: C36
F5-BIGIP-SYSTEM-MIB::sysGeneralHwNumber.0 = STRING: deprecated
F5-BIGIP-SYSTEM-MIB::sysGeneralChassisSerialNum.0 = STRING: bip256156s
F5-BIGIP-SYSTEM-MIB::sysPlatform.5.1.0 = STRING: "C36"
F5-BIGIP-SYSTEM-MIB::sysPlatform.5.2.0 = STRING: "BIG-IP 1500"
./check_f5.pl -H test -C test
Checks FAILED. See details.|cpu_user=9%;80;90;0;100 cpu_idle=85%;20;10;0;100 mem_pc=1.77%;80;90;0;100 mem_used=26110896;1179438284;1326868070;0;1474297856
CPU average usage: 9% (idle 85%)
Memory usage 1.77%
Temperature sensor #2 has unknown status.
CRIT: Temp sensor #1 reads 41 >= 35
Unit fan #6 has failed.
Unit fan #5 has failed.
Unit fan #4 has failed.
Unit fan #3 has failed.
Unit fan #2 has failed.
Unit fan #1 has failed.
Unit PSU #1 has failed.