On our ASA, we have different groups for ASA users. In PRTG we are currently monitoring the total number of VPN users. Now I would like to see the number of users four each group, is this possible within PRTG?
At the moment I have written a simple bash script for this, is it possible to do some kind of grep on a custom mib within PRTG?
user@server:~/scripts$ cat asascript.sh #!/bin/bash community=communitystring while IFS='' read -r line || [[ -n "$line" ]]; do GROUP1=$(snmpwalk -v 2c -c $community -O v -L n $line 1.3.6.1.4.1.9.9.392.1.3.21.1.2 | sed 's/^.*://g' | sed 's/"//g' | grep -oc 'GROUP1') GROUP2=$(snmpwalk -v 2c -c $community -O v -L n $line 1.3.6.1.4.1.9.9.392.1.3.21.1.2 | sed 's/^.*://g' | sed 's/"//g' | grep -oc 'GROUP2') echo "IP is" $line echo "users group1 is" $GROUP1 echo "users group2 is" $GROUP2 done < "$1" user@server:~/scripts$
At this moment i use the MIB, 1.3.6.1.4.1.9.9.392.1.3.21.1.2 and then i grep the groupname.
1.3.6.1.4.1.9.9.392.1.3.21.1.2 is the mib for: The name of the user group to which this remote access session belongs.
Do you have suggestions, or an idea how I can best solve this? Thanks in advance.
Add comment