I must first point out that this solution borrows heavily from
this thread on the Cacti forums... I also use the perl script that enables this functionality in Cacti (query_asa_lan2lan_cisco.pl) and just "port it over" to the equivalent in Zabbix.
The only significant change I had to make was the order of the arguments to the script... Zabbix expects to call external scripts with the first argument being the hostname/IP matching the item, so I had to flip the order of the arguments in query_asa_lan2lan_cisco.pl
The basic technical overview of setting this up:
-pick a folder you want to store custom scripts in on your Zabbix server. I personally use /etc/zabbix/externalscripts.
-enable the "external_scripts" folder in your zabbix_server.conf, and point it at that folder.
-copy the query_asa_lan2lan_cisco.txt script attached to this post to that external_scripts folder previously mentioned... rename it to a .pl file instead of .txt. I had to do that because of forum attachment rules.
-the script depends on the Net::SNMP perl module. On CentOS and RHEL all I had to do to get this module was "yum install perl-Net-SNMP"... your mileage may vary depending on your OS. It probably should be as easy as an 'emerge' or an 'apt-get' depending on your distribution
-Make sure you 'chown zabbix:zabbix' that script so your zabbix server user owns the script
In the Zabbix web console:
-create a Host for your PIX/ASA (unless you already have)
-create an inbound Item similar to the screenshot attached. Note the data type is decimal and the custom multiplier is 8 (this converts raw bps to Kbps or Mbps in the graphs... much prettier)
For a Cisco ASA, the format for the Key part of the item you create will be:
Code:
query_asa_lan2lan.pl[<snmp community string> ASA get RX <IPsec peer IP>]
-create an outbound item... instead of using RX in the key just mentioned use TX (transmit)
If you're querying a VPN Concentrator just switch ASA with CONCENTRATOR in the item's key.... I haven't tested anything other than ASAs though because we've moved completely to them at work
Note: in my example replace <snmp community string> with your community string and <IPsec peer IP> with the IP address of the peer that corresponds to the tunnel you'd like to monitor - for example:
Code:
query_asa_lan2lan.pl[public ASA get RX 4.2.2.2]
would query your ASA for the bandwidth of the tunnel that corresponds with IPsec peer 4.2.2.2
After you setup these Items, you can go nuts with Zabbix and create pretty graphs, triggers based on bandwidth if you like, etc etc.