I have problems creating a script data query.
I'm following this walthtough: https://docs.cacti.net/manual:087:3a_ad ... alkthrough
When trying the script I have this error:
Total: 0.000000, Delta: 0.000000, Found data query XML file at '/usr/share/cacti/resource/script_queries/XXX.xml'
Total: 0.000000, Delta: 0.000000, Running Data Query [20].
Total: 0.000000, Delta: 0.000000, Found Type = '4' [Script Query].
Total: 0.000000, Delta: 0.000000, Found data query XML file at '/usr/share/cacti/resource/script_queries/XXX.xml'
Total: 0.000000, Delta: 0.000000, Error parsing XML file into an array.
There seems to be no issue when trying to convert the file into an array using this website: https://wtools.io/convert-xml-to-php-array
I tried using the tag <interface> as shown here: https://docs.cacti.net/manual:087:3a_ad ... alkthrough and the tag <query> as shown here: https://www.cacti.net/downloads/docs/ht ... y_xml.html but both of them give me the same result.
My CACTI version is 1.2.8 and you can see below my XML file.
Any help would be very appreciated, thanks !
Code: Select all
<query>
<name>Get ARP Table</name>
<description>Queries a list of number of ARP entries per interface.</description>
<script_path>sh |path_cacti|/scripts/hydra_arp_counter.sh</script_path>
<arg_prepend>|host_hostname|</arg_prepend>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<arg_num_indexes>num_indexes</arg_num_indexes>
<output_delimeter>:</output_delimeter>
<index_order>fwDevice</index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<fwDevice>
<name>Firewall IP</name>
<direction>input</direction>
<query_name>device</query_name>
</fwDevice>
<fwInterface>
<name>Interface Name</name>
<direction>output</direction>
<query_name>int</query_name>
</fwInterface>
<fwARPs>
<name>ARP Entries</name>
<direction>output</direction>
<query_name>arp</query_name>
</fwARPs>
</fields>
</query>