cscript error

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

Moderators: Developers, Moderators

Post Reply
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

cscript error

Post by ascendo »

Hi all

I've got a freshly installed cacti (using MSI installer), and it seemed to be working fine, until I tried to create my own data query.

When I run the query against a device, I get an error in the verbose output like this:

+ Found item [FLDID=' Loading your settings failed. (Access is denied. )'] index: CScript Error

I have given read+execute access (to IUSRS) to the script (which is in c:\inetpub\wwwroot\cacti\scripts).

The script path (XML file) looks liket this:

cscript.exe |path_cacti|/resource/scripts/script.vbs

I'm running on Windows 2008 R2 + IIS7.5.

I've also allowed IUSRS read access to HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings

Any ideas?

Cheers

Ascendo
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Whos MSI installer did you use? I'm not aware of anyone creating one...

2) start simple and then get more complicated. Does the built-in scripts/templates (snmp processor, interface, disk, etc) work fine on devices?

3) Once your basic cacti installation is working, then it's time to try custom scripts. WMI scripts require a lot of hole punching to get a normal user account working with them -- much easier with an admin account and also more security risks.

The documentation site has more details how to get custom scripts working with cacti.
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

Apologies, it's not an MSI - it's the installer from here: http://forums.cacti.net/about14946.html.

I have managed to resolve the problem by running as a different application pool identity. All working great now - thanks!
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

OK so I've been experiencing more difficulties. The data query runs fine, and if I run through "Create graphs for this host", the graph (based on the Traffic - In/Out bits/sec template), as well as the data source, is created.

However, the .rrd file never appears, and after enabling debug logging, I can see the neither cmd.php, nor spine, is actually polling the data sources which are created. There are simply no log entries whatsoever.

Any ideas as to how I can debug what's going on here?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) the windows scheduled task is running every poller.php every 5 minutes?

2) clear out the cacti.log file, change the logging level to debug and then let the poller run for a cycle. post the log as an attachment.

3) The scheduled task user has the correct ntfs permissions on cmd.exe, rrdtool / php / cacti folders ?
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

1) Poller is running every minute (I like to sample every 1 min instead of 5). I tested with an SNMP device and it does work - data source is created and the graph displays correctly.

2) See attached.

3) Scheduled task runs as an administrator account at the moment.
Attachments
clog.txt
(3.32 KiB) Downloaded 93 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

ascendo wrote:1) Poller is running every minute (I like to sample every 1 min instead of 5). I tested with an SNMP device and it does work - data source is created and the graph displays correctly.
It does? Per your cacti log, no data is being collected right now. I'd suggest going back to 5 min polling until things are working again. 1 min polling isn't easy to set up as it requires other changes than just changing the poller interval.
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

Changed back to 5 minutes. Added an SNMP device and it did poll and create the data source/graph on both 1 min and 5 min. Still no polling for this script data query though.

At what stage is the .rrd file supposed to be created? There was no associated .rrd file, but when I ran the exact debug output for the data source which was created, it did create the file.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

The basic cacti default templates create graphs successfully now?

The rrd file is suppose to get created/updated each polling cycle after the data gets collected. In the Data Source for your script, is there a defined rrd file? have you read through http://docs.cacti.net/manual:088:4_help.2_debugging yet ?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests