RRD Creation Problem (After trying to create a php script)

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Misora
Posts: 7
Joined: Thu Jul 14, 2005 2:35 pm

RRD Creation Problem (After trying to create a php script)

Post by Misora »

I decided to make a ping script for windows that is capable of 2 decimal points of accuracy. Unfortunately, I have no clue why rrd files are not being created for the data source. I tried to follow the manual as close as I could to create a set of templates.

Currently attempting to use the "Script - Script Server (PHP)" method. Here is the input string I have:

Code: Select all

<path_cacti>/scripts/ss_tping.php ss_tping <hostname>
Output from script server (command line):

Code: Select all

C:\Documents and Settings\Administrator>php c:\cacti\script_server.php
PHP Script Server has Started - Parent is cmd
c:\cacti\scripts\ss_tping.php ss_tping google.com
AV:13.25 PL:0
quit
PHP Script Server Shutdown request received, exiting
Output from cacti.log:

Code: Select all

07/14/2005 05:40:20 PM - PHPSVR: Poller[0] DEBUG: INCLUDE: 'C:\cacti/scripts/ss_tping.php' SCRIPT: 'ss_tping' CMD: 'google.com'
07/14/2005 05:40:24 PM - PHPSVR: Poller[0] SERVER: C:\cacti/scripts/ss_tping.php ss_tping google.com output AV:79.75 PL:17
07/14/2005 05:40:24 PM - CMDPHP: Poller[0] Host[10] DS[38] SERVER: C:\cacti/scripts/ss_tping.php ss_tping google.com, output: AV:79.75 PL:17
From what I can tell, CACTI2RRD never runs to create (or update) the rrd for this script...

I could not find any documentation after a bit of looking on the xml files which are located in /resource/script_server. As a result, I didn't write one for my script... Any possibility that this is the problem?

If any additional information is needed, I'll be glad to post. And hopefully I can get this working and post the windows ping script that a lot of people seem to want.

Thanks for any suggestions anyone might have.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

There is a bug in Cacti 0.8.6x with PHP Script Server Scripts. I will attach the fix here. Apply the patch and then you will be able to accurately associate the DS items with the output variables. Sorry about that.

TheWitness
Attachments
phpscriptserverfix.zip
(9.88 KiB) Downloaded 1044 times
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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you need additional help, send me an e-mail.

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?
Misora
Posts: 7
Joined: Thu Jul 14, 2005 2:35 pm

Post by Misora »

Problem solved, ping script posted.

http://forums.cacti.net/viewtopic.php?t=8497
fas73
Posts: 5
Joined: Fri Jul 15, 2005 6:35 am

Post by fas73 »

Hey,

I'm quite new to this.. can you please explain how to apply the patch? I have been looking for the two files to be replaced (?) in my cacti folder with no success. Please explain.. thanks!
georger_br
Cacti User
Posts: 63
Joined: Mon Jul 04, 2005 10:12 am
Location: Brazil

Post by georger_br »

This should be a sticky. It would be helpful to put this on the homepage as well.

Georger
TheWitness wrote:There is a bug in Cacti 0.8.6x with PHP Script Server Scripts. I will attach the fix here. Apply the patch and then you will be able to accurately associate the DS items with the output variables. Sorry about that.

TheWitness
fas73
Posts: 5
Joined: Fri Jul 15, 2005 6:35 am

Post by fas73 »

.... I think I had a bad search in my micro$oft OS a while ago.. the two patch-files of course are present at the root of the cacti... will overwrite them now and hopefully that's it!

PS: don't search for two files at the same time in Windows... it does not work...!

thaks!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests