Issue with perl script in changing from cmd.php to spine
Moderators: Developers, Moderators
Issue with perl script in changing from cmd.php to spine
Operating System: WIN2K3
Webserver: IIS
Cacti: 8.7c
Spine: 8.7a
MySQL: 5.1.11
PHP: 5.2.5
RRDTool (Cygwin or Win32 version): 1.2.15 Win32
Net-SNMP: 5.4.1-3 win32
Cygwin (cygwin1.dll version): 1.5.24
Plugin Architecture: 2.3
I have been looking through the posts trying to determine how to resolve my issue. I am in the process of moving to use spine as my poller instead of cmd.php and am having issues with one script. All others I have been able to convert. Attached please find the script and script query I am using.
If using cmd.php the following is logged under debug.
02/05/2009 03:11:21 PM - CMDPHP: Poller[0] Host[190] DS[9185] CMD: \win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS2.2, output: 16000
02/05/2009 03:11:17 PM - CMDPHP: Poller[0] Host[190] DS[9184] CMD: \win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSdropbitrate 1.COS2.2, output: 0
If using spine we run into the issue with the following in the logs.
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] DS[9199] SCRIPT: \win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS1.2, output: U
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] DS[9199] WARNING: Result from SCRIPT not valid. Partial Result: ...
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] ERROR: Empty result [hostname]: '\win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS1.2'
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] DEBUG: The POPEN returned the following File Descriptor 38
If run at the command line the command and output are....
\win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS1.2
164000
When using cmd.php data is returned properly by the script, and converted into RRDs, so I have not attached any screen shots of data/graph templates as these do not appear to be the problem. However upon converting to spine incorrect data appears to be returned to the script. I have verified all of my paths for executables in the files are using the full path name (including attempting to add .exe to end of file name) as recommended. Have rebuilt poller cache, and also deleted and recreated the data sources. The only thing I have not attempted to do is install spine 0.8.7c as the link for the Windows binary appears to still be source and I have not had time to compile.
Any suggestions would be greatly appreciated. Also let me know if I can provide any additonal info. Usually I have been able to resolve all my issues by reading the forums but this one is stumping me.
Thanks.
Webserver: IIS
Cacti: 8.7c
Spine: 8.7a
MySQL: 5.1.11
PHP: 5.2.5
RRDTool (Cygwin or Win32 version): 1.2.15 Win32
Net-SNMP: 5.4.1-3 win32
Cygwin (cygwin1.dll version): 1.5.24
Plugin Architecture: 2.3
I have been looking through the posts trying to determine how to resolve my issue. I am in the process of moving to use spine as my poller instead of cmd.php and am having issues with one script. All others I have been able to convert. Attached please find the script and script query I am using.
If using cmd.php the following is logged under debug.
02/05/2009 03:11:21 PM - CMDPHP: Poller[0] Host[190] DS[9185] CMD: \win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS2.2, output: 16000
02/05/2009 03:11:17 PM - CMDPHP: Poller[0] Host[190] DS[9184] CMD: \win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSdropbitrate 1.COS2.2, output: 0
If using spine we run into the issue with the following in the logs.
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] DS[9199] SCRIPT: \win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS1.2, output: U
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] DS[9199] WARNING: Result from SCRIPT not valid. Partial Result: ...
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] ERROR: Empty result [hostname]: '\win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS1.2'
02/05/2009 03:50:01 PM - SPINE: Poller[0] Host[190] DEBUG: The POPEN returned the following File Descriptor 38
If run at the command line the command and output are....
\win-ids\perl\bin\perl C:\Inetpub\wwwroot\cacti\scripts\qospol.pl hostname community 2 get QoSbitrate 1.COS1.2
164000
When using cmd.php data is returned properly by the script, and converted into RRDs, so I have not attached any screen shots of data/graph templates as these do not appear to be the problem. However upon converting to spine incorrect data appears to be returned to the script. I have verified all of my paths for executables in the files are using the full path name (including attempting to add .exe to end of file name) as recommended. Have rebuilt poller cache, and also deleted and recreated the data sources. The only thing I have not attempted to do is install spine 0.8.7c as the link for the Windows binary appears to still be source and I have not had time to compile.
Any suggestions would be greatly appreciated. Also let me know if I can provide any additonal info. Usually I have been able to resolve all my issues by reading the forums but this one is stumping me.
Thanks.
"\win-ids\perl\bin\perl" doesn't seem to be a valid path regardless. Anyways, with Spine, you will need to specify the FULL path to the Perl binary in the data input method template.
| 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 |
It appears that I had to take the "full path" statement one step further than I thought. /win-ids/perl/bin/perl (this is the correct path as I share the perl install with a previously installed program) changed to C:/win-ids/perl/bin/perl rebuilt the poller cache and all works well with the script under Spine. All previous posts that I had read never mentioned the drive letter so maybe this is more windows specific.
Thanks for the suggestions.
Thanks for the suggestions.
Operating System: WIN2K3
Webserver: IIS
Cacti: 8.7c
Spine: 8.7a
MySQL: 5.1.11
PHP: 5.2.5
RRDTool (Cygwin or Win32 version): 1.2.15 Win32
Net-SNMP: 5.4.1-3 win32
Cygwin (cygwin1.dll version): 1.5.24
Plugin Architecture: 2.3
Webserver: IIS
Cacti: 8.7c
Spine: 8.7a
MySQL: 5.1.11
PHP: 5.2.5
RRDTool (Cygwin or Win32 version): 1.2.15 Win32
Net-SNMP: 5.4.1-3 win32
Cygwin (cygwin1.dll version): 1.5.24
Plugin Architecture: 2.3
- TheWitness
- Developer
- Posts: 17061
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I prefer Linux, rather recommend, for any real hard core installs.
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?
Come back to the dark side. It's warm and squishy.
| 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 4 guests