Home » Configs » Nagios Bluecoat connection monitor

Nagios Bluecoat connection monitor

nagiosNagios Bluecoat connection monitor

 

 

 

 

 

Nagios Bluecoat connection monitor

 

#!/bin/sh
#
# A unixsamurai script by John Beck 02-27-2010
#
# OpenSource, GPL yada yada, use it if you will
# but release the changes back into the wild so
# we can all benefit from it!
#
# This should be in your /usr/local/nagios/libexec folder
# and added to /usr/local/nagios/etc/commands.cfg
# nagios-bluecoat-connections $HOSTADDRESS
#
#
# you can run this from command line with the IP
# example:
# nagios-bluecoat-connections 192.192.192.192

URL=$1
PASSWORD=yourpassword
USER=yourusername

CONNECTIONS=$(/usr/bin/wget -q -O – –user=$USER –password=$PASSWORD –no-check-certificate “https://$URL:8082/TCP/Connections” | cat |grep Summary |awk ‘{print $4}’)

# echo $CONNECTIONS

# We’re ok
if [ $CONNECTIONS -lt 13500 ]; then
echo $CONNECTIONS
exit 0
fi

# Uh oh, starting to get high, let’s enter Warning
if [ $CONNECTIONS -lt 14000 ]; then
echo $CONNECTIONS
exit 1
fi

# Yipes, if we get to 14000 we’re done, let’s go CRITITAL at 14000
if [ $CONNECTIONS -gt 14000 ]; then
echo $CONNECTIONS
exit 2
fi


As an Amazon Associate I earn from qualifying purchases. Read our Privacy Policy for more info.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.