Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- date=$(date +%s)
- #perfile="/usr/local/nagios/var/service-perfdata"
- host=$1
- snmp=$2
- war=$3
- crit=$4
- min=0
- max=20
- conex=$(/usr/bin/snmpwalk -v2c -c HPTU 172.20.38.1 CISCO-REMOTE-ACCESS-MONITOR-MIB::crasWebvpnNumSessions | awk '{print $4}')
- if [ "$conex" -ge "$crit" ]
- then
- echo "$1 VPN-SSL conections are $conex = CRITICAL | connections=$conex;$war;$crit;$min;$max"
- #$perfdata="connections=$conex;$war;$crit;0;20"
- exit 2
- elif [ "$conex" -ge "$war" ]
- then
- echo "$1 VPN-SSL conections are $conex = WARNING | connections=$conex;$war;$crit;$min;$max"
- #$perfdata="connections=$conex;$war;$crit;0;20"
- exit 1
- elif [ "$conex" -lt "$war" ]
- then
- echo "$1 VPN-SSL conections are $conex = OK | connections=$conex;$war;$crit;$min;$max"
- #$perfdata="connections=$conex;$war;$crit;0;20"
- exit 0
- fi
Add Comment
Please, Sign In to add comment