SNMP - PHP problems
Moderators: Developers, Moderators
SNMP - PHP problems
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
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
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Have you tried deleting the snmp.conf file?
TheWitness
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?
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?
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
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
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
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
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Did you remove MIBS=ALL? Did you reboot?
TheWitness
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?
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?
- RaduAlexandru
- Posts: 43
- Joined: Mon Mar 28, 2005 5:06 pm
- Location: Bucharest, Romania
- Contact:
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
So any ideeas??
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:
No, you don't. Really should start your own thread instead of hijacking gperez234's.RaduAlexandru wrote:Guis I have a similar problem....
Turn on debugging for one cycle and see which OID is no longer valid.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 0 guests