Here is my XML document:
Code: Select all
<query>
<name>Get ZFS Pool Stats</name>
<description>Queries a list of ZFS pools on a host, returning some stats.</description>
<script_path>perl |path_cacti|/scripts/query_zfs_pools.pl</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_delimiter>:</output_delimiter>
<index_order>zpoolName<index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<zpoolName>
<name>zpool Name</name>
<direction>input</direction>
<query_name>pools</query_name>
</zpoolName>
<zpoolReadBytes>
<name>zpool Read Bytes</name>
<direction>output</direction>
<query_name>read_bps</query_name>
</zpoolReadBytes>
<zpoolReadOps>
<name>zpool Read Operations</name>
<direction>output</direction>
<query_name>read_ops</query_name>
</zpoolReadOps>
<zpoolUsage>
<name>zpool Percentage Used</name>
<direction>output</direction>
<query_name>usage</query_name>
</zpoolUsage>
<zpoolWriteBytes>
<name>zpool Write Bytes</name>
<direction>output</direction>
<query_name>write_bps</query_name>
</zpoolWriteBytes>
<zpoolWriteOps>
<name>zpool Write Operations</name>
<direction>output</direction>
<query_name>write_ops</query_name>
</zpoolWriteOps>
</fields>
</query>
Code: Select all
$ perl query_zfs_pools.pl hostname index
pool1
pool2
pool3
$ perl query_zfs_pools.pl hostname query read_bps
pool1:675737
pool2:21516779
pool3:23958
$ perl query_zfs_pools.pl hostname get read_bps pool1
623411
I have graph templates for r/w bytes (read_bps and write_bps), r/w ops (read_ops/write_ops) and usage, but when I try to associate them, the data templates listed have no items in the drop-down. I am very fuzzy on exactly what this does. If I understood it better, I'm sure I'll see what I'm doing wrong.
Can anyone enlighten me?
Thanks.