Here's the data query:
Code: Select all
<interface>
<name>Get Cisco ASA/PIX VPN Statistics</name>
<script_path>perl |path_cacti|/scripts/query_lan2lan_cisco.pl</script_path>
<arg_prepend>|host_snmp_community| |host_hostname| ASA</arg_prepend>
<arg_get>get</arg_get>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<output_delimeter>:</output_delimeter>
<index_order>PeerIP</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field| IPSec Traffic</index_title_format>
<fields>
<PeerIP>
<name>Peer IP</name>
<direction>input</direction>
<query_name>index</query_name>
</PeerIP>
<RX>
<name>Received Traffic</name>
<direction>output</direction>
<query_name>RX</query_name>
</RX>
<TX>
<name>Transmitted Traffic</name>
<direction>output</direction>
<query_name>TX</query_name>
</TX>
</fields>
</interface>
Code: Select all
SPINE: Poller[0] Host[3] ERROR: Empty result [10.2.3.4]: 'perl /usr/local/cacti/scripts/query_lan2lan_cisco.pl community 10.2.3.4 ASA get index 10.2.3.4'
Code: Select all
CMDPHP: Poller[0] ASSERT: '10.2.3.4=' failed. Recaching host '10.2.3.4', data query #11
Code: Select all
+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/cisco_asa_vpn_tunnel.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/local/cacti/scripts/query_lan2lan_cisco.pl community 1.2.3.4 ASA index'
+ Executing script query 'perl /usr/local/cacti/scripts/query_lan2lan_cisco.pl community 1.2.3.4 ASA query index'
+ Found item [PeerIP='10.1.2.3'] index: 10.1.2.3
+ Found item [PeerIP='10.1.2.4'] index: 10.1.2.4
+ Found item [PeerIP='10.2.3.8'] index: 10.2.4.8
+ Found item [PeerIP='10.4.8.12'] index: 10.4.8.12
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/cisco_asa_vpn_tunnel.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/cisco_asa_vpn_tunnel.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/cisco_asa_vpn_tunnel.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/cisco_asa_vpn_tunnel.xml'
perl query_lan2lan_cisco.pl community 10.2.3.4 ASA index
1.2.3.4
5.6.7.8
1.2.3.1
4.3.2.1
I believe this is where the issue is...
perl query_lan2lan_cisco.pl community 10.2.3.4 ASA query index
1.2.3.4:1.2.3.4
5.6.7.8:5.6.7.8
1.2.3.1:1.2.3.1
4.3.2.1:4.3.2.1
I believe this should be returning an index value, and not the same thing twice.
I have attached the script. I gathered it from http://forums.cacti.net/viewtopic.php?t=27211
Any suggestions?