BIND9 script doesn't work after upgrade (SOLVED-Workaround?)

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

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

So, I am assuming that there is only 1 index in your system. Please clarify. The walk now walks correctly, but there is only 1 item in the return, which means one of two things.

If you can confirm that there is only supposed to be one graphable item (1 Row), that would help.

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?
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

No,

at the beggining of the post, I included the xml file where you can see the queries: http://forums.cacti.net/viewtopic.php?p=179174#179174

To get all the data with snmpwalk query, instead of snmpbulkget, I should changet the OID, deleting the las '.1'. Here the examples doing the different queries from the command line:

Code: Select all

lognet54:~ # snmpbulkget -v2c -c /publica/-mad codnsca4.wnet .1.3.6.1.4.1.2021.55.1
UCD-SNMP-MIB::ucdavis.55.2.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.3.1 = STRING: "Estadisticas Peticiones DNS"
UCD-SNMP-MIB::ucdavis.55.4.1 = INTEGER: 71088733
UCD-SNMP-MIB::ucdavis.55.5.1 = INTEGER: 1462195
UCD-SNMP-MIB::ucdavis.55.6.1 = INTEGER: 14060833
UCD-SNMP-MIB::ucdavis.55.7.1 = INTEGER: 1740900
UCD-SNMP-MIB::ucdavis.55.8.1 = INTEGER: 18536711
UCD-SNMP-MIB::ucdavis.55.9.1 = INTEGER: 82190247
UCD-SNMP-MIB::versionIndex.0 = INTEGER: 1
UCD-SNMP-MIB::versionTag.0 = STRING: 5.3.0.1
lognet54:~ #
lognet54:~ #
lognet54:~ # snmpwalk -v1 -c /publica/-mad codnsca4.wnet .1.3.6.1.4.1.2021.55.1
UCD-SNMP-MIB::ucdavis.55.1.1 = INTEGER: 1
lognet54:~ #
lognet54:~ #
lognet54:~ # snmpwalk -v1 -c /publica/-mad codnsca4.wnet .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.3.1 = STRING: "Estadisticas Peticiones DNS"
UCD-SNMP-MIB::ucdavis.55.4.1 = INTEGER: 71088733
UCD-SNMP-MIB::ucdavis.55.5.1 = INTEGER: 1462195
UCD-SNMP-MIB::ucdavis.55.6.1 = INTEGER: 14060833
UCD-SNMP-MIB::ucdavis.55.7.1 = INTEGER: 1740900
UCD-SNMP-MIB::ucdavis.55.8.1 = INTEGER: 18536711
UCD-SNMP-MIB::ucdavis.55.9.1 = INTEGER: 82190247
To be honest, I don't really know which is the difference between snmpwalk and snmpbulkget. According this tests, do I have to make any change in the xml file to use it with SNMP v1 ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

From what I see, it should be working with snmpv1. The only way that I would be able to further diagnose this would be online GotoMeeting or something similar.

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?
User avatar
lcano
Cacti User
Posts: 190
Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain

Post by lcano »

Hi,

good news!!

after your comments recommending SNMP v1 instead v2, I continue the troubleshooting and It finally works doing some changes in the .xml file of the DATA QUERY. I had to change the beggining of the file, where it is described the 'oid_index'. If I deleted the last .1 from the OID index, it started to work. Here an extract of the file before and after the changes:

BEFORE:

Code: Select all

<query>
        <name>Get BIND 9 Statistics via SNMP</name>
        <description>Queries a host for a list of zones</description>
        <oid_index>.1.3.6.1.4.1.2021.55.1</oid_index>

        <fields>
                <bindIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.55.1</oid>
                </bindIndex>
AFTER:

Code: Select all

<query>
        <name>Get BIND 9 Statistics via SNMP</name>
        <description>Queries a host for a list of zones</description>
        <oid_index>.1.3.6.1.4.1.2021.55</oid_index>

        <fields>
                <bindIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2021.55</oid>
                </bindIndex>
Pending confirmation along this day to check that graphs shows correct values, but it started to draw something.

Then, my conclusions (please, TheWitness, let me know if I am wrong in any of them for future troubleshooting).

1.- When using snmp-v2, Cacti poller uses snmpbulkget command to extract values from an OID. You should get it the OID_INDEX and it follows with the resto of the OID and data.
2.- When using snmp-v1, Cacti poller uses snmpwalk command, so I had to go up in the OID level tree removing the last number. Then, it worked !!
3.- SNMP polling development have a significat change between v0.8.6j and 0.8.7e, which causes that data queries working in previous versions may not work in future ones. (This is something to be carefull with. May be something to review?)

Problems associated to this:

1.- Because of I had to move to snmp-v1, any other data query included in the host template should also work in snmp-v1, not snmp-v2, as snmp version is globaly configured for the host. That means in my case, that traffic in interfaces, which is also included in the host template, won't work properly up to 100 mpbs, due to traffic in/out 64 bits is not usable.

This is not a great problem in my case because I can extract the traffic from the network devices, but is something to keep in mind.

Thanks to all of you for your help, specially TheWitness.

Best Regards.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The solution to the bulkwalk issue will be to disable php-snmp as it defaults to the "bulk" walk method after 5.1.6 I think. If you are on Linux/UNIX, using those binaries instead of the builtin (so long as you are using spine) will not introduce too much delay.

This way, you can continue to use the 64bit counters. Glad you figured it out.

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?
ari
Posts: 24
Joined: Fri Jan 08, 2010 10:29 am

Post by ari »

TheWitness wrote:The solution to the bulkwalk issue will be to disable php-snmp as it defaults to the "bulk" walk method after 5.1.6 I think. If you are on Linux/UNIX, using those binaries instead of the builtin (so long as you are using spine) will not introduce too much delay.

This way, you can continue to use the 64bit counters. Glad you figured it out.

TheWitness
Hi TheWitness - I've run into the same issue, that seems to be related to Solaris snmpdx daemon.

I managed to setup the solaris bind-stats script and expose the counters through snmp.

I can snmpwalk from my linux cacti box.

Code: Select all

/usr/share/cacti/resource/snmp_queries$ snmpwalk -v 2c -c mypass MY-IP .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.1.2 = INTEGER: 2
....
But cacti still finds no snmp data:

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'

You mention that:

Code: Select all

 The solution to the bulkwalk issue will be to disable php-snmp as it defaults to the "bulk" walk method after 5.1.6 I think 

Can you shed some lignt on how do I disable php-snmp so as to use the binaries you mention, so that I can keep using snmp v2c?

I can't find any config option for this. I did notice the PATH configuration to the snmpwalk binary in the Path config section, which is already set OK.

TIA[/code]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest