Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


create script query index

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: General
Author Message
kosta



Joined: 06 May 2005
Posts: 13

PostPosted: Wed Nov 19, 2008 3:51 pm    Post subject: create script query index Reply with quote

Im trying to setup a script index query to allow us to list a bunch of ids that we can then poll data from and graph:

I dont use index/query for the indexing or querying, but not sure what else may be wrong.

Script in the below xml (php index.php) is run with the "-l" option when I run verbose query, but nothing:

Code:

+ Running data query [20].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/apache/sites/cacti.4rnd.com/html/resource/script_queries/sms_mo_mt.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/local/bin/php /net/web/tsam.4rnd.com/html/index.php -l '
+ Executing script query '/usr/local/bin/php /net/web/tsam.4rnd.com/html/index.php -l'
+ Found data query XML file at '/usr/local/apache/sites/cacti.4rnd.com/html/resource/script_queries/sms_mo_mt.xml'
+ Found data query XML file at '/usr/local/apache/sites/cacti.4rnd.com/html/resource/script_queries/sms_mo_mt.xml'
+ Found data query XML file at '/usr/local/apache/sites/cacti.4rnd.com/html/resource/script_queries/sms_mo_mt.xml'


below is the xml file.

Code:

<query>
   <name>Get SMS Shortcodes</name>
   <description>Queries a list of SMS shortcodes on SAM and Medianet</description>

   <script_path>/usr/local/bin/php index.php </script_path>
   <arg_index>-l </arg_index>
   <arg_query></arg_query>
   <arg_get>-m -s</arg_get>

   <arg_num_indexes>num_indexes</arg_num_indexes>
   <output_delimeter>:</output_delimeter>
   <index_order></index_order>
   <index_order_type>numeric</index_order_type>

   <index_title_format>|chosen_order_field|</index_title_format>

   <fields>
      <shortCode>
         <name>ShortCode</name>
         <direction>input</direction>
         <query_name>-l</query_name>
      </shortCode>
  <mo>
         <name>MO</name>
         <direction>output</direction>
         <query_name>mo</query_name>
      </mo>
    <mt>
         <name>MT</name>
         <direction>output</direction>
         <query_name>mt</query_name>
      </mt>
   </fields>
</query>


Any ideas why its failing? Sample index:

php index.php -l
55
65
66
70


Above are then used php index.php -m -s (index_id)

mo:64
mt:148


kosta
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: General All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group