Script not being executed by Cacti
Moderators: Developers, Moderators
Script not being executed by Cacti
Hello,
I have inherited a working version of Cacti which successfully polls a number of switches and routers and graphs the results. However, I would also like to plot the output of a regularly executed perl script. The script runs fine from the command line, but it never actually gets executed now that I've added it into Cacti (I've set the script to modify a log file each time it executes successfully for debug purposes). Consequently, no .rrd file is getting created either (I did follow the procedure in the manual).
I'd appreciate any comments if anyone else has had a similar problem - I've checked out directory permission issues and I think they are all o.k. The operating system is XP with Cacti 0.8.5a. Do I have to specifically add this script to some type of scheduler?
Thanks,
Adrian
I have inherited a working version of Cacti which successfully polls a number of switches and routers and graphs the results. However, I would also like to plot the output of a regularly executed perl script. The script runs fine from the command line, but it never actually gets executed now that I've added it into Cacti (I've set the script to modify a log file each time it executes successfully for debug purposes). Consequently, no .rrd file is getting created either (I did follow the procedure in the manual).
I'd appreciate any comments if anyone else has had a similar problem - I've checked out directory permission issues and I think they are all o.k. The operating system is XP with Cacti 0.8.5a. Do I have to specifically add this script to some type of scheduler?
Thanks,
Adrian
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
If you are running Cactid, you require the base install of Cygwin which include a file called SH.EXE. If you are currently running only with the cygwin1.dll file in your cacti directory, you need to make this change.
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?
Hi there
I have added sh.exe in the cactid directory, and php dir (its in the path variable), does not seem to make a difference, is this the only file involved ?
Yep, cacti can become a deasease, be careful
Yep, cacti can become a deasease, be careful
LIfe is very hard without the proper tools.....I am but a Slave...
Hi there
I have added sh.exe in the cactid directory, and php dir (its in the path variable), does not seem to make a difference, is this the only file involved ?
Yep, cacti can become a deasease, be careful
Yep, cacti can become a deasease, be careful
LIfe is very hard without the proper tools.....I am but a Slave...
That seems to have already been installed. I have a /usr/bin directory on my XP machine which includes various .EXEs, including CACTID.EXE and SH.EXE. The CYGWIN1.DLL file is in C:\WINNT\SYSTEM32 directory. Does that help at all?TheWitness wrote:If you are running Cactid, you require the base install of Cygwin which include a file called SH.EXE. If you are currently running only with the cygwin1.dll file in your cacti directory, you need to make this change.
Thanks again,
Adrian
Cactid poller and U partial results
I have both sh.exe and cygwin1.dll in the windows dir path, does not make a difference...I am still looking for a solution to this, if I find one I will post it, but I went now to cmd.php poller which does not have this problem....
Leo
Leo
LIfe is very hard without the proper tools.....I am but a Slave...
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
My suggestion is that you remove the two files and install the base cygwin from www.cygwin.com. You will have to remove those files first though. You should also insure that your path includes the c:\cygwin\bin directory.
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?
Cygwin
As I mentioned in another post. I installed the base package for cygwin, and now the variables from the perl script are OK....
Now we know, the complete base package, and not just sh.exe and the cygwin1.dll...
Everything is ok for now
Now we know, the complete base package, and not just sh.exe and the cygwin1.dll...
Everything is ok for now
LIfe is very hard without the proper tools.....I am but a Slave...
Unfortunately that hasn't fixed it for me, but I'll keep looking though. I'd like to get some decent logs about what's going on. I've seen this procedure suggested a couple of times in the forum to enable logging: "Settings-> General-> Poller Specific Logging Enable debugging" but this option simply doesn't exist under General on my setup. Leo - have you been using the debug mode?
Thanks, Adrian
Thanks, Adrian
Hi
Yes I use the various debug modes, especially the highest level when I run into problems. But I am using Cacti 0.8.6c with all the new patches.
This could be the difference. Maybe it helps if you post a trace of the error from your debug menu......
leo
This could be the difference. Maybe it helps if you post a trace of the error from your debug menu......
leo
LIfe is very hard without the proper tools.....I am but a Slave...
Unfortunately I don't have anywhere near that number of options under the General tab - I only have the following options listed:
Log File
What cacti should put in its log.
SNMP Version
The type of SNMP you have installed.
Guest User
The name of the guest user for viewing graphs; is "guest" by default.
Remove Verification
Confirm Before the User Removes an Item.
I have to assume that this more detailed logging was added in version 0.8.6. I've tried running cacti from the command line: "cacti.exe > out.log" but the filename of my script isn't even listed anywhere in the output (lots of other successful SNMP stuff is logged though). I'm reluctant to upgrade yet (seeing as all the SNMP polls are executing perfectly).
Adrian
Log File
What cacti should put in its log.
SNMP Version
The type of SNMP you have installed.
Guest User
The name of the guest user for viewing graphs; is "guest" by default.
Remove Verification
Confirm Before the User Removes an Item.
I have to assume that this more detailed logging was added in version 0.8.6. I've tried running cacti from the command line: "cacti.exe > out.log" but the filename of my script isn't even listed anywhere in the output (lots of other successful SNMP stuff is logged though). I'm reluctant to upgrade yet (seeing as all the SNMP polls are executing perfectly).
Adrian
Upgrade..
I fully understand, many things can go wrong at an upgrade.
But if you could set up a different machine running the new Cacti, its not that hard to transfer the database and the graphs, but its a pain in the....
Leo
But if you could set up a different machine running the new Cacti, its not that hard to transfer the database and the graphs, but its a pain in the....
Leo
LIfe is very hard without the proper tools.....I am but a Slave...
I've just been reading some other discussions on this forum. It looks like my scheduled task setting is wrong, it is presently set to run cactid, not php.exe. Also, I can't actually find a poller.php file. Does this mean PHP might not have been installed properly in the first place on this system?
Adrian
Adrian
Who is online
Users browsing this forum: No registered users and 0 guests