Problem to add new Data query

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
andrezenun
Posts: 2
Joined: Wed Sep 26, 2007 6:47 pm

Problem to add new Data query

Post by andrezenun »

Hello people...

I'm trying to add a new Data Query for my PLC Equipments (Powerline Communications) in Cacti, but I always get this error when add this query to my device... I have this error:

Code: Select all

Notice: Undefined index: arg_index in /usr/share/cacti/site/lib/data_query.php on line 98
Notice: Undefined index: script_path in /usr/share/cacti/site/lib/data_query.php on line 98
Notice: Undefined index: arg_query in /usr/share/cacti/site/lib/data_query.php on line 109
Notice: Undefined index: query_name in /usr/share/cacti/site/lib/data_query.php on line 109
Notice: Undefined index: script_path in /usr/share/cacti/site/lib/data_query.php on line 109
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/lib/data_query.php:98) in /usr/share/cacti/site/host.php on line 129
And enabling the "Verbose query" I have this same error on apache but some way I can see the verbose message when I click BACK on my browser:

Code: Select all

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/enlaceplctx.xml'
+ XML file parsed ok.
+ Executing script for list of indexes ' '
+ Executing script query ' '
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/enlaceplctx.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/enlaceplctx.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/enlaceplctx.xml'
Well my XML file is this one:

Code: Select all

<enlaceplctx>
   <name>Get PLC Enlace Statistics</name>
   <description>Queries a PLC</description>

   <oid_index>.1.3.6.1.4.1.6798.3.3.1.1.11.1</oid_index>

   <index_order_type>numeric</index_order_type>
   <index_title_format>|chosen_order_field|</index_title_format>

   <fields>
      <plPhyByMACTXPhySpeed>

         <name>Transmission</name>
         <method>walk</method>
         <source>value</source>
         <direction>input</direction>

         <oid>.1.3.6.1.4.1.6798.3.3.1.1.11.1</oid>
      </plPhyByMACTXPhySpeed>
   </fields>
</enlaceplctx>
Well I be very thankful if some one give some help!
Thanks!

André
shull
Cacti User
Posts: 54
Joined: Thu Aug 24, 2006 1:20 am
Location: South Texas
Contact:

Post by shull »

I was getting errors like this when I was trying to debug some of teh scripts and XML files that I generated.

Try these things:

1. Make sure your script can handle arguments like index and query. Make sure they return values when these parameters are used.
2. Check your index OID in your XML file. It looks like your OID_INDEX is the same as your OID in the field plPhyByMACTXPhySpeed. Make sure your index is good.
3. Make sure that the index you have chosen is an actual index.

When I was encountering this error, it was because the script that I had generated was not using the correct index. It kept appending a .0 on it. I fixed that by doing a snmpget and snmpwalk on OIDs near the OID I was looking for.

Check your Index. If you can query the actual OID of index, that might be your problem. Also, like I mentioned above. Make sure your script will return a value when you use index as a parameter.

-Stephen
www.cactiexchange.com -- Hosted Tools for the Cacti Community:
Cacti Perl Tool
Cacti XML Tool
Search OID-to-Names

[url=http://www.google.com/search?num=100&hl=en&safe=off&domains=forums.cacti.net&q=cacti&sitesearch=forums.cacti.net]Cacti Forums Google Index -- Better than the main page version![/url]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests