Platform: FC3
Cacti Version 0.8.6g: Fresh and Patched with the lastest patches.
I'm attempting to create a custom script query for some ServerIron Vips on my network.
Here's an example of my script output via cli:
[web@someserver scripts]$ ./query_si_vips.pl si001 index
ttt1
ttt2
http1
http2
smtp1
smtp2
ns3
ns4
[web@someserver scripts]$ ./query_si_vips.pl si001 query vips
ttt1:0
ttt2:4472
http1:4207
http2:0
smtp1:9
smtp2:0
ns3:0
ns4:4370
Here's my Script Query .xml File:
<query>
<name>Get ServerIron VIP Data</name>
<description>Get ServerIron VIP Data.</description>
<script_path>perl |path_cacti|/scripts/query_si_vips.pl</script_path>
<arg_prepend>|host_hostname|</arg_prepend>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<output_delimeter>:</output_delimeter>
<index_order>vipName:vipNcc</index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<vipName>
<name>Vip Name</name>
<direction>input</direction>
<query_name>vips</query_name>
</vipName>
<vipNcc>
<name>Number of Current Connections</name>
<direction>output</direction>
<query_name>vips</query_name>
</vipNcc>
</fields>
</query>
And finally here's my .xml parsed debug output from cacti:
Data Query Debug Information
+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/spln/src/cacti/resource/script_queries/si_vips.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /spln/src/cacti/scripts/query_si_vips.pl si001 index'
+ Executing script query 'perl /spln/src/cacti/scripts/query_si_vips.pl si001 query vips'
+ Found data query XML file at '/spln/src/cacti/resource/script_queries/si_vips.xml'
+ Found data query XML file at '/spln/src/cacti/resource/script_queries/si_vips.xml'
+ Found data query XML file at '/spln/src/cacti/resource/script_queries/si_vips.xml'
Every thing seems to run but it yeilds "Success [0 Items, 0 Rows]" Note the zero Items and Rows.
I can't seem to figure out why It's not getting the data I see on the cli.
The problem goes a bit deeper but I'm starting here cause i believe this to be the root of my problems.
Any help would be GREATLY appreciated. I've read the ENTIRE cacti manual, and have been ALL over the net and cacti forum. This is my last resort
Problem with Custom "Script Query"
Moderators: Developers, Moderators
Moved to general, since this is not an Informational/HOWTO's
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
One problem with that script is that there are hard returns after each value. Cacti doesnt like that. Keep them all on the same line.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Problem with Custom "Script Query"
<query_name>vips occurs twice. Without digging deeper this seems strange to me. And please report the outcome of a "get" call.dennism wrote: <fields>
<vipName>
<name>Vip Name</name>
<direction>input</direction>
<query_name>vips</query_name>
</vipName>
<vipNcc>
<name>Number of Current Connections</name>
<direction>output</direction>
<query_name>vips</query_name>
</vipNcc>
</fields>
</query>
Reinhard
Who is online
Users browsing this forum: No registered users and 4 guests