SNMP - PHP problems

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

Moderators: Developers, Moderators

Post Reply
gperez234
Posts: 4
Joined: Tue Feb 15, 2005 3:16 pm
Location: NYC
Contact:

SNMP - PHP problems

Post by gperez234 »

Hi, I am new to using Cacti and I am having lots of problems. I am running the following on my implementation of Cacti on a Windows 2003 server
ActivePerl 5.8.6.811
mysql-4.1.9
apache_2.0.52
Cacti-0.8.6c
cactid-0.8.6d
net-snmp-5.2.1-1
php4.3.10
rrdtool-1.0.48.
I have read through a lot of the other submissions before submitting this and from teh ones I have read nothing seemed to work. I ran cmd.php and below is my output
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)
Could not open input file: C:\apache\apach2\htdocs\cacti\poller.php.
I stumbled upon this because everything seems to be configured properly in my cacti install but under General Management\devices for the clients I have installed I get SNMP status unknown. I appreciate any feedback I can get on this. Thanks

Update: I have checked to make sure that my MISDIR environment variable is set to C:\php\extra\mibs (thats where my MIBS dir was) I also edited my SNMP.conf file and put a ; before Persistendir C:/net-snmp/snmp/persist and tempfilepattern c:/net-snmp/temp/snmpdxxxxxx
Update: I also added to my PATH C:\apache\apache2\htdocs\cacti reran the poller.php again and this was the output
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 Warning: main(./include/config.php): failed to open stream: No such file or
directory in C:\APACHE\Apache2\htdocs\cacti\poller.php on line 25
PHP Warning: main(): Failed opening './include/config.php' for inclusion (inclu
de_path='c:\apache2\htdocs\cacti') in C:\APACHE\Apache2\htdocs\cacti\poller.php
on line 25
PHP Warning: main(./include/auth.php): failed to open stream: No such file or d
irectory in C:\APACHE\Apache2\htdocs\cacti\poller.php on line 26
PHP Warning: main(): Failed opening './include/auth.php' for inclusion (include
_path='c:\apache2\htdocs\cacti') in C:\APACHE\Apache2\htdocs\cacti\poller.php on
line 26
PHP Warning: main(./lib/utility.php): failed to open stream: No such file or di
rectory in C:\APACHE\Apache2\htdocs\cacti\poller.php on line 27
PHP Warning: main(): Failed opening './lib/utility.php' for inclusion (include_
path='c:\apache2\htdocs\cacti') in C:\APACHE\Apache2\htdocs\cacti\poller.php on
line 27
PHP Warning: main(./include/top_header.php): failed to open stream: No such fil
e or directory in C:\APACHE\Apache2\htdocs\cacti\poller.php on line 67
PHP Warning: main(): Failed opening './include/top_header.php' for inclusion (i
nclude_path='c:\apache2\htdocs\cacti') in C:\APACHE\Apache2\htdocs\cacti\poller.
php on line 67
PHP Fatal error: Call to undefined function html_start_box() in C:\APACHE\Apach
e2\htdocs\cacti\poller.php on line 294
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Are you using MIBS=all. If so, please remove this environment variable from your system and reboot. This could also be a permissions issue. You should be able to get some help. Good luck.

TheWtiness
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?
gperez234
Posts: 4
Joined: Tue Feb 15, 2005 3:16 pm
Location: NYC
Contact:

Post by gperez234 »

MIBS=ALL was removed already and i checked perm's on all of the folders required to ensure that they had read-write-execute
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Have you tried deleting the snmp.conf file?

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?
gperez234
Posts: 4
Joined: Tue Feb 15, 2005 3:16 pm
Location: NYC
Contact:

Post by gperez234 »

Deleted SNMP.conf but that didnt work. I tried uninstalling Net-snmp rebooted then re-installed net-snmp. I then opened a cmd prompt and ran the cmd.php and poller.php cmd and this time I got no output. I then installed the Windows SNMP agent and started the service. Still no output.
Here is exactly how I ran the commands

C:\APACHE\Apache2\htdocs\cacti>C:\php\php-win.exe C:\apache\apache2\htdocs\cacti
\poller.php

C:\APACHE\Apache2\htdocs\cacti>C:\php\php-win.exe C:\apache\apache2\htdocs\cacti
\cmd.php
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Is it "MIBSDIR" or "MIBDIRS". I vote on the second entry. This is not your only problem. RU Sure that your user has full control to the apache directory structure?

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?
gperez234
Posts: 4
Joined: Tue Feb 15, 2005 3:16 pm
Location: NYC
Contact:

Post by gperez234 »

MIBSDIR = C:\php\extras\mibs is the environment variable I have set. I also double checked the perms to the directory and I had it set for Read, Write and Execute. I added Full control to the user account just in case.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

That's your problem. The variable should be MIBDIRS not MIBSDIR. Another documentation issue. I thought this had already been corrected on the web site. I will communicate with the webmaster.

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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I change MIBSDIR to MIBDIRS. But I still have same problem shown below:
C:\php>php c:\Apache2\htdocs\cacti\cmd.php
Content-type: text/html
X-Powered-By: PHP/4.3.10

#!/usr/bin/php -q
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
02/21/2005 11:11:20 AM - CMDPHP: Poller[0] Time: 2.7942 s, Theads: N/A, Hosts: 3
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you remove MIBS=ALL? Did you reboot?

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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Yes. I deleted. And I correct MIBSDIR as MIBDIRS
User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Post by RaduAlexandru »

Guis I have a similar problem....
The pages render corect (exept the graphs, witch are not generated) but I have an error when I in the log is written

Code: Select all

03/30/2005 02:00:02 AM - CMDPHP: Poller[0] Host[3] WARNING: Result from SNMP not valid.  Partial Result: 
So any ideeas??
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

RaduAlexandru wrote:Guis I have a similar problem....
No, you don't. Really should start your own thread instead of hijacking gperez234's.

Turn on debugging for one cycle and see which OID is no longer valid.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests