No 1 Index in XML

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

Moderators: Developers, Moderators

Post Reply
Slawka
Posts: 3
Joined: Thu Aug 09, 2007 3:13 am

No 1 Index in XML

Post by Slawka »

Code: Select all

<interface>
        <name>Get SNMP MVTS</name>
        <description>SNMP Originator</description>
        <oid_index>.1.3.6.1.4.1.999.10.101.1.1</oid_index>
        <oid_index_parse>OID/REGEXP:.*([0-9]{1,3})$</oid_index_parse>
        <index_order>Activ</index_order>
        <index_order_type>numeric</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>
        <fields>
                <ifIndex>
                        <name>Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.999.10.101.1.2</oid>
                </ifIndex>
                <ifActiv>
                        <name>Activ</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.999.10.101.1.10</oid>
                </ifActiv>
        </fields>
</interface>

Code: Select all

snmpwalk -v 2c -n0 -c <qqqqqq> 127.0.0.1:1161 .1.3.6.1.4.1.999.10.101.1.1
SNMPv2-SMI::enterprises.999.10.101.1.1.26 = INTEGER: 26
SNMPv2-SMI::enterprises.999.10.101.1.1.35 = INTEGER: 35
SNMPv2-SMI::enterprises.999.10.101.1.1.36 = INTEGER: 36
SNMPv2-SMI::enterprises.999.10.101.1.1.37 = INTEGER: 37
SNMPv2-SMI::enterprises.999.10.101.1.1.38 = INTEGER: 38
SNMPv2-SMI::enterprises.999.10.101.1.1.39 = INTEGER: 39
SNMPv2-SMI::enterprises.999.10.101.1.1.40 = INTEGER: 40
SNMPv2-SMI::enterprises.999.10.101.1.1.41 = INTEGER: 41
SNMPv2-SMI::enterprises.999.10.101.1.1.42 = INTEGER: 42
SNMPv2-SMI::enterprises.999.10.101.1.1.43 = INTEGER: 43
SNMPv2-SMI::enterprises.999.10.101.1.1.44 = INTEGER: 44

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/apache/htdocs/cacti/resource/snmp_queries/snmp_mvts.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.999.10.101.1.1.25'
+ No SNMP data returned
+ Found data query XML file at '/usr/local/apache/htdocs/cacti/resource/snmp_queries/snmp_mvts.xml'
+ Found data query XML file at '/usr/local/apache/htdocs/cacti/resource/snmp_queries/snmp_mvts.xml'
+ Found data query XML file at '/usr/local/apache/htdocs/cacti/resource/snmp_queries/snmp_mvts.xml'
Please help
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please refer to the first link of my signature for a step-by-step procedure to create own XML files for Data Queries. This may help debugging.
And, if possible, please retry using the standard SNMP port on localhost, at least until the XML is finished. Some time ago, there was an error in this area. I do not remember exactly ...
Reinhard
Slawka
Posts: 3
Joined: Thu Aug 09, 2007 3:13 am

Post by Slawka »

The Problem dared by change to functions in file lib/snmp.php
With function snmp2_real_walk requests and answers go, but function their does not get.

lib/snmp.php

Code: Select all

               }elseif ($version == "2") {
                        //$temp_array = @snmp2_real_walk("$hostname:$port", "$community", "$oid", ($timeout * 1000), $retries);
                        $temp_array = @snmprealwalk("$hostname:$port", "$community", "$oid", ($timeout * 1000), $retries);
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I would suggest that this is an agent problem. If you change the SNMP version to 1, does the problem go away?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests