Guest User

Untitled

a guest
Jul 15th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. #!/bin/bash
  2. date=$(date +%s)
  3. #perfile="/usr/local/nagios/var/service-perfdata"
  4. host=$1
  5. snmp=$2
  6. war=$3
  7. crit=$4
  8. min=0
  9. max=20
  10. conex=$(/usr/bin/snmpwalk -v2c -c HPTU 172.20.38.1 CISCO-REMOTE-ACCESS-MONITOR-MIB::crasWebvpnNumSessions | awk '{print $4}')
  11.  
  12. if [ "$conex" -ge "$crit" ]
  13.         then
  14.         echo "$1 VPN-SSL conections are $conex = CRITICAL | connections=$conex;$war;$crit;$min;$max"
  15.         #$perfdata="connections=$conex;$war;$crit;0;20"
  16.         exit 2
  17.  
  18. elif [ "$conex" -ge "$war" ]
  19.         then
  20.         echo "$1 VPN-SSL conections are $conex = WARNING | connections=$conex;$war;$crit;$min;$max"
  21.         #$perfdata="connections=$conex;$war;$crit;0;20"
  22.         exit 1
  23. elif [ "$conex" -lt "$war" ]
  24.         then
  25.         echo "$1 VPN-SSL conections are $conex = OK | connections=$conex;$war;$crit;$min;$max"
  26.         #$perfdata="connections=$conex;$war;$crit;0;20"
  27.         exit 0
  28. fi
Add Comment
Please, Sign In to add comment