LirazM
Aug 02, 2018Nimbostratus
Cronjob that checks every 15 min if there is no APM active session, than disable the virt.
Hello there,
My goal is to check every 15 minutes if there is no active APM session , if not, disable the virt.
i thought i will have a bash script that i can call from crontab with the timing: 0,15,30,45 * * * * /var/tmp/disablevirt
and check if there is an active connections with snmpwalk: snmpwalk -Os -c public -v 2c localhost apmPaStatCurrentActiveSessions | grep PROFILENAME
if VALUE is equal to 0, run this: tmsh modify ltm virtual virt_NAME disabled else echo "Users are still connected."
Thanks for the help.