cscript error
Moderators: Developers, Moderators
cscript error
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
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
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.
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.
| 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 |
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!
I have managed to resolve the problem by running as a different application pool identity. All working great now - thanks!
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?
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?
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 ?
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 ?
| 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 |
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.
2) See attached.
3) Scheduled task runs as an administrator account at the moment.
- Attachments
-
- clog.txt
- (3.32 KiB) Downloaded 93 times
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 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.
| 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 |
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.
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.
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 ?
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 ?
| 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