Script not being executed by Cacti

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

Moderators: Developers, Moderators

anb
Posts: 13
Joined: Tue Dec 14, 2004 11:22 am
Location: Luxembourg

Script not being executed by Cacti

Post by anb »

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
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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?
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Hi there

Post by LA »

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 :wink:
LIfe is very hard without the proper tools.....I am but a Slave...
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Hi there

Post by LA »

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 :wink:
LIfe is very hard without the proper tools.....I am but a Slave...
anb
Posts: 13
Joined: Tue Dec 14, 2004 11:22 am
Location: Luxembourg

Post by anb »

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.
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?

Thanks again,
Adrian
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Cactid poller and U partial results

Post by LA »

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
LIfe is very hard without the proper tools.....I am but a Slave...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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
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?
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Cygwin

Post by LA »

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 :P
LIfe is very hard without the proper tools.....I am but a Slave...
anb
Posts: 13
Joined: Tue Dec 14, 2004 11:22 am
Location: Luxembourg

Post by anb »

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
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Hi

Post by LA »

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
LIfe is very hard without the proper tools.....I am but a Slave...
Guest

Post by Guest »

I know this sounds stupid, but I can't see how to enable that level of debugging through the web interface. Can you tell me how you enable that please?

Cheers,
Adrian
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Post by LA »

look at the pick below

follow setting -> General tab ->
Attachments
cacti.jpg
cacti.jpg (128.05 KiB) Viewed 7069 times
LIfe is very hard without the proper tools.....I am but a Slave...
anb
Posts: 13
Joined: Tue Dec 14, 2004 11:22 am
Location: Luxembourg

Post by anb »

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
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Upgrade..

Post by LA »

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
LIfe is very hard without the proper tools.....I am but a Slave...
anb
Posts: 13
Joined: Tue Dec 14, 2004 11:22 am
Location: Luxembourg

Post by anb »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests