cacti on windows: snmp error

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
budiwins
Posts: 6
Joined: Sun Sep 25, 2005 9:57 pm
Location: Jakarta
Contact:

cacti on windows: snmp error

Post by budiwins »

Hi all,
I'm installing cacti on my windows 2003 server, using php, apache, and mysql (windows version). I'm able to see the cacti console, but when i try the 1st step to create devices, it always has "SNMP error". I've put the corect snmp string & ip address, and try out several cisco devices, I receive the same "SNMP error".
From the server itself, I run snmpwalk using the same SNMP string, it is OK, there's no error.
I've following the installation procedure for windows, and the only thing skipped is IIS configuration, since I don't use IIS? do I need to install IIS?

Thanks for helping ...

budiwins
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Sounds like your php is missing snmp support. From the command prompt, type: php -m and paste the output.

No, you don't need IIS. But you will need some sort of web server ;-)
budiwins
Posts: 6
Joined: Sun Sep 25, 2005 9:57 pm
Location: Jakarta
Contact:

Post by budiwins »

Yes, u're right. But after enabling snmp on php.ini, then restart the apache httpd, I found this error:
C:\>php -m
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]

Creating directory: /USR
Creating directory: /USR/SNMP
Creating directory: /USR/SNMP/PERSIST

Is there anything that should be done?

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

Post by TheWitness »

You need to define the following environment variable: MIBDIRS Point it to the MIBS supplied in the PHP distribution. I think they are in the EXTRAS directory.

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?
budiwins
Posts: 6
Joined: Sun Sep 25, 2005 9:57 pm
Location: Jakarta
Contact:

Post by budiwins »

You're great man ... after adding MIBDIRS and restarting the server, there's no more errors. I really appreciate it !!

=======================================
C:\>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]


C:\>
=======================================
sawal_xp
Posts: 1
Joined: Thu Apr 05, 2007 1:05 am
Contact:

Post by sawal_xp »

i want to install cacti in my computr,windows xp..but
i have problem..with snmp error...

From the command prompt, i type: php -m and. The output is :
C:\>php -m
[PHP Modules]
bcmath
calendar
com
ctype
ftp
mysql
odbc
overload
pcre
session
snmp
sockets
standard
tokenizer
wddx
xml
zlib

[Zend Modules]

..
from that output..no error found..
so what is my problem that couse my net-snmp or snmp not work or alway in status error when add the device in cacti..?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) read http://forums.cacti.net/viewtopic.php?t=11747

2) exactly what error are you getting? Make sure you've got the Microsoft SNMP agent properly set up that you're trying to get info from.
undead
Posts: 2
Joined: Fri Dec 22, 2006 3:38 am

Post by undead »

You need to define the following environment variable: MIBDIRS Point it to the MIBS supplied in the PHP distribution. I think they are in the EXTRAS directory.

TheWitness
Please help me how to define MIBDIRS environment variable ?
This is the first time i use Cacti & php .
I received the "SNMP error " notification similar like this .
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

undead wrote:Please help me how to define MIBDIRS environment variable ?

Read http://forums.cacti.net/viewtopic.php?t=11747 !!
undead wrote:I received the "SNMP error " notification similar like this .
Probably because you haven't properly configured the snmp service on windows, properly set up PHP or a firewall is blocking the traffic.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests