I want to graph sessions per domains, so I created my own Data Query.
Data Query: Data Input Method: Get Script Data (Indexed)
I had to add my own DataTemplate to know what it is about...
Data Template: Data Input Method: Get Script Data (Indexed)
gauge, and all common stuffs.
created a graph, and added it to the dataquery, using the datatemplate as source, and associating it with my sessions.
I used the DataQuery on a host, which managed to find my sites properly.
I created the graphs for those sessions, it went well, creating the appropriate datasource and graphs...
BUT, even if the data source seems to be here, there is nothing in the poller cache that even try to get it, and i have no idea why...
I do see in SNMP cache that it managed to get site siteName, dbName, dbHost, ... but no informations about my sessions either.
xmlFile wrote:<query>
<name>MyQuery</name>
<description>Get Stats (sessions for now)</description>
<script_path>/bin/sh |path_cacti|/scripts/query_sessions.sh</script_path>
<!-- av[1] for specified action -->
<arg_index>index</arg_index> <!-- list of indexes -->
<arg_query>query</arg_query> <!-- list of values by fieldname -->
<arg_get>get</arg_get> <!-- value by fieldname/index -->
<arg_num_indexes>num_indexes</arg_num_indexes> <!-- index count -->
<output_delimeter>:</output_delimeter>
<index_order>siteName:site</index_order>
<index_order_type>alphanumeric</index_order_type>
<index_title_format>|siteName|</index_title_format>
<fields>
<site>
<name>Site</name>
<direction>input</direction>
<query_name>site</query_name>
</site>
<siteName>
<name>Site Name</name>
<direction>input</direction>
<query_name>siteName</query_name>
</siteName>
<dbName>
<name>Database Name</name>
<direction>input</direction>
<query_name>dbName</query_name>
</dbName>
<dbHost>
<name>Database Host</name>
<direction>input</direction>
<query_name>dbHost</query_name>
</dbHost>
<dbSessions>
<name>Sessions</name>
<direction>output</direction>
<query_name>sessions</query_name>
</dbSessions>
</fields>
</query>
scriptExemples wrote:$ ./script.sh index
site1
site2
$ ./script.sh query sessions
site1:42
site2:21
$ ./script.sh get sessions site1
42$ ./script.sh get sessions site2
21$
notes, if it might help: debian lenny, lastest updates.