I have written a script that seems to produce the same format output as lets say host_disk.xml and the associated script. here is some examples of my output. Im missing something here... I know the scripting is horrid I will rewrite it to rsh only once and redirect to a local file and then grep out my fields locally, but for now it should still produce the desired results for testing.. My problem seems to be getting 0 rows returned in query. Ill post a verbose query below.
# /usr/local/cacti/scripts/sun_ioquery.sh vaerp2 index
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/usr/local/cacti/scripts/sun_ioquery.sh vaerp2 query desc
1:c0t0d0
2:c0t1d0
3:c0t6d0
4:c1t1d0
5:vanas01:/vol/cptest1/t03
6:vanas01:/vol/cptest1/t02
7:vanas01:/vol/cpprod2/n08
8:vanas01:/vol/cpprod1/n07
9:vanas01:/vol/cpprod1/n06
10:vanas01:/vol/cpprod2/n04
11:vanas01:/vol/cpprod1/n02
12:vanas01:/vol/cpprod1/n03
13:vanas01:/vol/cpprod1/n05
14:vanas01:/vol/cptest2/t04
15:vanas01:/vol/cptest1/t05
16:vanas01:/vol/cptest1/t07
17:vanas01:/vol/cptest1/t06
18:vanas01:/vol/cptest2/t08
/usr/local/cacti/scripts/sun_ioquery.sh vaerp2 get desc 1
c0t0d0
Here is a verbose output of the query within cacti
+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/sun_ioquery.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/local/cacti/scripts/sun_ioquery.sh 10.20.64.14 index'
+ Executing script query '/usr/local/cacti/scripts/sun_ioquery.sh 10.20.64.14 query index'
+ Executing script query '/usr/local/cacti/scripts/sun_ioquery.sh 10.20.64.14 query desc'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/sun_ioquery.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/sun_ioquery.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_queries/sun_ioquery.xml'
Help with Script Queries
Moderators: Developers, Moderators
Help with Script Queries
- Attachments
-
- sun_ioquery.zip
- Zip Contains XML and SH Script.
- (1.01 KiB) Downloaded 99 times
RSH in script query
Hi,
I got the exact problem as you do.It seems that rsh is not suported in script query.
I try to run rsh in data input method and it works well,but when it is used in script query i get 0 rows of output.
I got the exact problem as you do.It seems that rsh is not suported in script query.
I try to run rsh in data input method and it works well,but when it is used in script query i get 0 rows of output.
Who is online
Users browsing this forum: No registered users and 1 guest