Windows SNMP wizard failing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Windows SNMP wizard failing

Post by tgriep »

The snmpwalk command is a compiled application that you run from the command line.
The wizard uses a PHP function called snmprealwalk() or snmp2_real_walk() depending on the version of PHP, the commands are different.

Run the following as root and post the output here so we can get some details on your system.

Code: Select all

uname -a
cat /etc/*release*
grep CONFIGWIZARD_VERSION /usr/local/nagiosxi/html/includes/configwizards/windowssnmp/windowssnmp.inc.php
php -v
Run this but replace x.x.x.x with the IP address of the windows system and post how many lines are returned.

Code: Select all

snmpwalk -v 2c -c community x.x.x.x | wc -l
Thanks.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Windows SNMP wizard failing

Post by mbeebe »

tgriep wrote:The snmpwalk command is a compiled application that you run from the command line.
The wizard uses a PHP function called snmprealwalk() or snmp2_real_walk() depending on the version of PHP, the commands are different.

Run the following as root and post the output here so we can get some details on your system.

Code: Select all

uname -a
cat /etc/*release*
grep CONFIGWIZARD_VERSION /usr/local/nagiosxi/html/includes/configwizards/windowssnmp/windowssnmp.inc.php
php -v
Linux hostname 2.6.32-754.17.1.el6.x86_64 #1 SMP Thu Jun 20 11:47:12 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.10 (Santiago)
Red Hat Enterprise Linux Server release 6.10 (Santiago)
cpe:/o:redhat:enterprise_linux:6server:ga:server
CONFIGWIZARD_VERSION => "1.5.5",
PHP 5.3.3 (cli) (built: Nov 7 2016 11:21:30)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


Run this but replace x.x.x.x with the IP address of the windows system and post how many lines are returned.

Code: Select all

snmpwalk -v 2c -c community x.x.x.x | wc -l
snmpwalk -v 2c -c community x.x.x.x | wc -l
2255

Thanks.
Welcome

-- Mike Beebe
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Windows SNMP wizard failing

Post by tgriep »

Try this, edit this file

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/windowssnmp/windowssnmp.inc.php
Everywhere you see the old function called

Code: Select all

snmprealwalk
replace it with this,

Code: Select all

snmp2_real_walk
Save the change and restart Apache by running
service httpd restart
re-run the wizard and let us know if it worked.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Windows SNMP wizard failing

Post by mbeebe »

tgriep wrote:Try this, edit this file

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/windowssnmp/windowssnmp.inc.php
Everywhere you see the old function called

Code: Select all

snmprealwalk
replace it with this,

Code: Select all

snmp2_real_walk
Save the change and restart Apache by running
service httpd restart
re-run the wizard and let us know if it worked.

Yup, that fixed it. Is this wizard going to be over-written the next time I patch Nagios?

-- Mike Beebe
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Windows SNMP wizard failing

Post by tgriep »

It will probably get over written but I'll put in a BUG fix to get the wizard updated for the future.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Windows SNMP wizard failing

Post by mbeebe »

Hi,

Thank you for all your help on this. Please let me know when the bugfix is in place; we won't patch until then.

Go ahead and close.

Stay safe and take care.

-- Mike Beebe
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Windows SNMP wizard failing

Post by lmiltchev »

The issue has been fixed in the latest version of the Windows SNMP wizard (1.5.6). You can update your wizard by going to:

Admin > Manage Config Wizards > Check for Updates > Install Updates

Let us know if you have any further questions. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked