Hi everyone
I've picked up a problem when using Spine and a PHP script to pull data from a Cisco ACE load balancer.
When I use Spine, the output is always 'U':
06/21/2009 08:59:05 PM - SPINE: Poller[0] Host[48] DS[995] SCRIPT: c:\php\php-win.exe -q C:\cacti\scripts\ss_ace_vserver.php a.b.c.8 48 2:161:999:blanked:::MD5::[None] get NumberOfC 1.51, output: U
However, when I run CMD.PHP, it works fine:
06/21/2009 08:56:08 PM - CMDPHP: Poller[0] Host[48] DS[995] CMD: c:\php\php-win.exe -q C:\cacti\scripts\ss_ace_vserver.php a.b.c.8 48 2:161:999:blanked:::MD5::[None] get NumberOfC 1.51, output: 66
If I run the script from the command line it works fine too. I'm running the latest Spine (from announcements forum), Cacti 0.8.7d, Windows 2003 32 bit, IIS6, PHP 5.2.5.
All other data sources are polling fine with Spine, it's just this one which does not work.
Any ideas?
Thanks
Ascendo
Spine problems with PHP script
Moderators: Developers, Moderators
Give php.exe a try instead.As of PHP 5, a new php-win.exe file is distributed. This is equal to the CLI version, except that php-win doesn't output anything and thus provides no console (no "dos box" appears on the screen). This behavior is similar to php-gtk. You should configure with --enable-cli-win32.
| 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 |
I tried copying php.exe over php-win.exe, and I still get 'U' output. When I run from the command line now, I get this:
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)
7
So the output is displayed at the end, but all the errors I think are causing a problem - any way around this?
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)
7
So the output is displayed at the end, but all the errors I think are causing a problem - any way around this?
Why'd you copy it over? Just run php.exe instead of php-win.exe.
As for those MIB errors... they're because your MIBDIR environment variable is wrong/missing/missing MIB files. Read my FAQ/installation guide on how to fix.
As for those MIB errors... they're because your MIBDIR environment variable is wrong/missing/missing MIB files. Read my FAQ/installation guide on how to fix.
| 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 |
Cacti uses ANS.1 numbers and not MIB files, so that won't change anything.ascendo wrote:I've fixed the MIB error, but still no go.
Did you restore the original/real php.exe and php-win.exe first? They ARE different files.ascendo wrote:I also changed the PHP path to c:\php\php.exe (from php-win.exe) without any luck.
Wait a minute... if you're trying to run a PHP Script server script, you shouldn't need to specify php at all. The Data Input Method Input String should only have the path to the script and parameters. i.e. <path_cacti>/scripts/ss_speedfan_fan.php ss_speedfan_fan <hostname> <snmp_community> <snmp_version> <snmp_port> <snmp_timeout> <snmpv3_auth_username> <snmpv3_auth_password>ascendo wrote:Anything else I can try? Thanks for the assistance BSOD2600, really appreciate it.
| 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 |
Hi BSOD2600
I did restore the php executables.
The data source uses PHP to collect its data - the template I imported containts this line:
<script_path>|path_php_binary| -q |path_cacti|/scripts/ss_ace_vserver.php</script_path>
The script and template are from here: http://forums.cacti.net/about29195.html.
Thanks
Ascendo
I did restore the php executables.
The data source uses PHP to collect its data - the template I imported containts this line:
<script_path>|path_php_binary| -q |path_cacti|/scripts/ss_ace_vserver.php</script_path>
The script and template are from here: http://forums.cacti.net/about29195.html.
Thanks
Ascendo
Who is online
Users browsing this forum: No registered users and 4 guests