Code: Select all
<interface>
<name>Get RT Queues</name>
<description>Queries a list of Queues in Request Tracker.</description>
<script_path>perl |path_cacti|/scripts/query_rt.pl</script_path>
<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>Queue</index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<Queue>
<name>Queue Name</name>
<direction>input</direction>
<query_name>queue</query_name>
</Queue>
<Total>
<name>Total Open</name>
<direction>output</direction>
<query_name>total</query_name>
</Total>
<Average>
<name>Average</name>
<direction>output</direction>
<query_name>average</query_name>
</Average>
<Closed>
<name>Closed</name>
<direction>output</direction>
<query_name>closed</query_name>
</Closed>
<Open>
<name>Open</name>
<direction>output</direction>
<query_name>open</query_name>
</Open>
<New>
<name>New</name>
<direction>output</direction>
<query_name>new</query_name>
</New>
</fields>
</interface>
Code: Select all
*[root@ox]* ./query_rt.pl index
all_logging
___Approvals
avnet-sales
BCBS
bellcanada-sales
bonnetcreek
brazosportisd
bugs
burlington
CCG
cendant
Cisco
cisco-alerts
CityofDenton
collincounty
comstor-orders
comstor-sales
comstor-uk
cs_followup
current_installations
debug
Code: Select all
*[root@ox]* ./query_rt.pl query
bugs:
Cisco:
feature-request:
partner:
post_installation:
quotes:
sales:
sales-support:
Support:
Code: Select all
*[root@ox]* ./query_rt.pl query total
bugs:107
Cisco:9
feature-request:160
partner:34
post_installation:12
quotes:303
sales:51
sales-support:26
Support:458
Code: Select all
*[root@ox]* ./query_rt.pl get total Support
458
But, the poller is returning:
Code: Select all
CACTID: Host[14] ERROR: Empty result [rt.cistera.com]: 'perl /var/www/cacti.corp.dallas.cistera.com/htdocs/scripts/query_rt.pl get average bugs'
CACTID: Host[14] DS[67] WARNING: Result from SCRIPT not valid. Partial Result: ...
Code: Select all
*[root@ox]* perl /var/www/cacti.corp.dallas.cistera.com/htdocs/scripts/query_rt.pl get average bugs
167
I can also see from the poller log, it is putting each rrd into an inappropriate file, so I will have to figure out that as well - it is storing to <hostname>_closed (which is an output of the script) for each queue I want... Not sure where to fix that, or if I am missing something fundamental.
I have read lvm's (thank you btw) excellent writeups on snmp data queries and data templates, etc all day and am still coming up dry.
TIA for any help
-Greg