This script monitors the CPU temperature, sending email when the temperature exceeds the threshold or the polling cycle fails.
How to use this snippet:
Install script on remote system with appropriate permissions.
Edit the THRESHOLD, COMMUNITY, BIGIP_ADDR, and MAILTO variable values to match your environment
Configure cron to run the script at the desired interval.
# This code is not supported by F5 Network and is offered under the GNU General Public License. Use at your own risk.
T=`snmpget -v2c -c $COMMUNITY -Ov -Ot -Oe -Oq -OU $BIGIP_ADDR F5-BIGIP-SYSTEM-MIB::sysCpuTemperature.1`
if [ $? -eq 1 ]; then
mail $MAILTO -s "The snmpget command to BIG-IP at $BIGIP_ADDR failed" << EOF
The snmpget command failed. Verify the system and network path are viable and that the snmpd service is running
if [ $T -gt $THRESHOLD ]; then
mail $MAILTO -s "BIG-IP $BIGIP_ADDR reports CPU temp $T exceeds threshold $THRESHOLD" << EOF
BIG-IP $BIGIP_ADDR reports CPU temp $T has exceeded the notification threshold $THRESHOLD. Please investigate ASAP.