i'm working about a Data Query that extracts information of a csv file by means of perl script.
This csv file contains a numerical index and a description detached by TAB key.
I created a script and a xml file, but seems that Cacti doesn't accept output script, or maybe xml file is not valid.
An example of my CSV file is:
Code: Select all
1 aaaaaaa
2 bbbbbbb
3 ccccccc
1
2
3
when script is called with index
1:1
2:2
3:3
when script is called with query index
1:aaaaaaa
2:bbbbbbb
3:ccccccc
when script is called with query pipename
aaaaaaa
when script is calld with get 1
my xml file is:
Code: Select all
<query>
<name> Pipes Allot </name>
<description> Extreu pipes disponibles en fitxers csv d'Allot </description>
<script_path> perl |path_cacti|/scripts/allot_pipes.pl </script_path>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<output_delimeter>:</output_delimeter>
<index_order>index</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<id>
<name>Index</name>
<direction>input</direction>
<query_name>index</query_name>
</id>
<nompipe>
<name>Pipe</name>
<direction>input</direction>
<query_name>pipename</query_name>
</nompipe>
</fields>
</query>
Can you help me? What is wrong?Data Query Debug Information
+ Running data query [15].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_queries/allot_pipes.xml'
+ XML file parsed ok.
+ Executing script for list of indexes ' perl /var/www/cacti/scripts/allot_pipes.pl index'
+ Executing script query ' perl /var/www/cacti/scripts/allot_pipes.pl query index'
+ Executing script query ' perl /var/www/cacti/scripts/allot_pipes.pl query pipename'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/allot_pipes.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/allot_pipes.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/allot_pipes.xml'
Thanks.