[SOLVED] Perl Scripts Issue

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

Moderators: Developers, Moderators

terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

[SOLVED] Perl Scripts Issue

Post by terziyski »

Hi,

I thoght I had a little problem with a perl script, but it appears that I have a general problem with any kind of perl scripts.
When I write a perl script and add it to Data Input Methods with apropriate data and graph templates I receive in Catati Log file for data source:

CACTID: Poller[0] Host[429] ERROR: Empty result [XXX]: 'perl C:/Inetpub/Wwwroot/cacti/scripts/myscript.pl YYY'

The scripts are working perfectly under command prompt console, but in Cacti they are not sending any data.
I am using Cacti 0.8.6j version under Windows 2003 Server.
Does anyone can suggest something to resolve this issue ?
Sorry about the duplicated post.
Last edited by terziyski on Fri Nov 09, 2007 5:30 am, edited 1 time in total.
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

What happens if you specify the FULL path to the PERL executable, for example

'c:\perl\bin\perl.exe C:/Inetpub/Wwwroot/cacti/scripts/myscript.pl
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

It is still Empty result no matter wich I use :

'c:/perl/bin/perl.exe ...'
or
'c:\perl\bin\perl.exe ...'
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Did you clear the poller cache before the next run ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

No I did not. Now I am doing it.
Should I use format 'c:/perl/bin/perl.exe ...' or 'c:\perl\bin\perl.exe ...' ?
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Doesn't really matter, but I tend to prefer c:\perl\bin\perl.exe c:/<path to cacti>/scripts etc...

What poller are you using ? CACTID or cmd.php ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

Nope , the result is still 'Empty..'
I have cleared poller cache before adding the data sources again.
I am using CACTID.
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

I had this self-same issue. What happens if you move your CACTID binary (and the conf file) to the C:\Cygwin\Bin directory ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

Should I copy these files or move them ?
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Copy them to start, and change the location to the binary in CACTI (not during a poller run)
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

I have done that but the result is still 'Empty...'
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

If you are pulling data from WMI for example, does your poller account have access to this ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

I am pulling data from Internet and from DNS servers, but I am not using WMI.
In command prompt the scripts are working perfectly...
I gave the script files appropriate permissions (IUSR_XXXX,IIS_WPG). I gave to perl folder same permissions too.
Cacti user
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Could you post screenshots of your data sources etc ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
terziyski
Cacti User
Posts: 93
Joined: Thu Nov 02, 2006 6:02 am
Location: Bulgaria
Contact:

Post by terziyski »

Here they are:
Attachments
datainputmethod.JPG
datainputmethod.JPG (134.9 KiB) Viewed 5139 times
datasource.JPG
datasource.JPG (132.63 KiB) Viewed 5139 times
datatemplate.JPG
datatemplate.JPG (170.97 KiB) Viewed 5139 times
Cacti user
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests