Syslog daemon on Windows (can logged to database)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

Thank you pepj for the plugin. Works like a charm!

Still, I also had some issues with it. They all pertain to functions.php.

First is the leading "new line" character in the message being inserted which results in the lack of closing bracket. Thus sql insert every time returned 0. To overcome it just insert after "$msg = preg_replace("/'/", '%', $msg1);" the following:
$msg = rtrim($msg);

Second is the "path_php_binary" which somehow doesn't return anything:
$command_string = read_config_option("path_php_binary");
Just change it to the following (or whatever your path is):
$command_string = "c:/php/php.exe";

I attach my slightly modified version of functions.php for your convenience.
Attachments
functions.zip
(2.44 KiB) Downloaded 234 times
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Thanks for your feedback
airwalk wrote:First is the leading "new line" character in the message being inserted which results in the lack of closing bracket. Thus sql insert every time returned 0. To overcome it just insert after "$msg = preg_replace("/'/", '%', $msg1);" the following:
$msg = rtrim($msg);
I 've done the change in version 0.43
airwalk wrote:Second is the "path_php_binary" which somehow doesn't return anything:
$command_string = read_config_option("path_php_binary");
$command_string = "c:/php/php.exe";
I 've not do the change at this place because for most of the people it should function.
I have add an variable for default in config.php (I've used your default :-) )

new version 0.43 under http://forums.cacti.net/viewtopic.php?p=117245#117245
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests