Skip to content

Instantly share code, notes, and snippets.

@JosefJezek
Created November 18, 2013 11:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JosefJezek/7526240 to your computer and use it in GitHub Desktop.
Zenoss Checks

Zenoss Checks

Cisco VPN sessions count

check_ssh_cisco.sh ${here/manageIp} ${here/zCommandUsername} ${here/zCommandPassword} "show crypto session brief | include UA | VPN_NAME"

check_ssh_cisco.sh ${here/manageIp} ${here/zCommandUsername} ${here/zCommandPassword} "show webvpn session context CONTEXT_NAME | exclude WebVPN|Client_Login_Name"
#!/bin/sh

HOST=$1
USER=$2
PASS=$3
ARG=$4

result=$(sshpass -p $PASS ssh $USER@$HOST "$ARG" | wc -l)
echo "OK | count=$result"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment