- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-09-2024 12:52 PM
Hey guys.
I have a PA50xx with PAN-OS 8.1.25 with several Site-to-Site VPNs (some with ph2 any and others with ph2 configured) configured and my IT manager wants to monitor the VPNs through Zabbix.
I could do it via API, but in the PAN-OS 8 version it doesn't provide the necessary information. I even tried creating a script for this, but I'm having trouble executing the command "show vpn flow name TUNNEL_NAME" after the SSH connection and saving the result of the command.
I'll post what I already have.
#!/bin/bash
#SSH=$(which ssh)
USER_ZBX="api-backup"
PASS_ZBX="PASSWORD"
PANSERVER="10.10.10.10"
SHOW_VPN="show vpn flow name"
NAME_TUNNEL="TUNNEL_NAME"
SSH_PASS=$(which sshpass)
$SSH_PASS -p $PASS_ZBX ssh $USER_ZBX@$PANSERVER <<-EOF
$SHOW_VPN $NAME_TUNNEL
EOF
Thank you for your help.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!