data query script... not fetching all fields

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
cchance
Posts: 3
Joined: Tue May 08, 2012 11:18 am

data query script... not fetching all fields

Post by cchance »

Something odd...

I made the XML in fact i just copied the code from http://docs.cacti.net/manual:087:3a_adv ... alkthrough

and what i did is i extended it to include some additional fields, i added them to the php, and i added them to the xml file that i created....

If i set the new items to "input" direction i can see them when i go to create graphs in the table at the bottom... but of course this wont work because they are outputs, so i switch back to outputs, go into associate them with the data query, and do a verbose query of the data ... the issue is i get the following....

Code: Select all

+ Running data query [10].
+ Found type = '4' [Script Query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/moto.xml'
+ XML file parsed ok.
+ <arg_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting arg_index entries
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 index' Index Count: 3
+ Found index: 1
+ Found index: 2
+ Found index: 
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query index'
+ Found item [ifIndex='1'] index: 1
+ Found item [ifIndex='2'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifstatus'
+ Found item [ifstatus='up(1)'] index: 1
+ Found item [ifstatus='up(1)'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifdescription'
+ Found item [ifdescription='wireless interface'] index: 1
+ Found item [ifdescription='ethernet interface'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifname'
+ Found item [ifname='wireless interface'] index: 1
+ Found item [ifname='ethernet interface'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifalias'
+ Found item [ifalias='wireless interface'] index: 1
+ Found item [ifalias='ethernet interface'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query iftype'
+ Found item [iftype='ethernetCsmacd(6)'] index: 1
+ Found item [iftype='ethernetCsmacd(6)'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifspeed'
+ Found item [ifspeed='281740000'] index: 1
+ Found item [ifspeed='1000000000'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifHWaddress'
+ Found item [ifHWaddress='00:04:56:80:5F:FB'] index: 1
+ Found item [ifHWaddress='00:04:56:80:5F:FB'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifInOctets'
+ Found item [ifInOctets='2803110130'] index: 1
+ Found item [ifInOctets='1520247529'] index: 2
+ Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query ifOutOctets'
+ Found item [ifOutOctets='1538732660'] index: 1
+ Found item [ifOutOctets='2809366777'] index: 2
So its grabbing the original fields from the example walkthrough but the XML file has another 10 fields, and the php has those same fields available in fact if i run

/usr/bin/php -q /var/www/html/cacti/scripts/query_moto.php 172.16.2.28 '1234' 2 161 500 30 query rxDataRate

i get back 1!24


so it is working to grab the data (as can be seen also when its set to input instead of output) ...

the question i have is how do i get it to actually poll the rest of these fields i thought having it in the xml was enough but i think i am missing some crucial step... PLEASE HELP
cchance
Posts: 3
Joined: Tue May 08, 2012 11:18 am

Re: data query script... not fetching all fields

Post by cchance »

hmmm ok so outputs dont show there so i think thats what the issue is... but in this case why isnt it generating the rrd hmmmm
niobe
Cacti User
Posts: 228
Joined: Mon Mar 10, 2008 6:52 pm
Location: Australia

Re: data query script... not fetching all fields

Post by niobe »

outputs wont show in the verbose output. just look at a data source in debug mode for starters
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests