Syslog Issue on SUSE box

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
harner
Cacti User
Posts: 75
Joined: Tue Oct 17, 2006 10:21 am
Location: PA, USA

Syslog Issue on SUSE box

Post by harner »

First of all, thank you to the contributors and developers for making everything tie in so neatly.

OS: OpenSUSE 10.1 x64

Syslog does not seem to be working very well with me. I used http://forums.cacti.net/viewtopic.php?t=15495 as a reference to fix it up a bit. Here are my configs:

/etc/syslog-ng/syslog-ng.conf.in

Code: Select all

#
# Syslog/Haloe Plugin config
#
destination named_pipe {
pipe("/var/log/mysql.pipe"
template("INSERT INTO syslog (facility, priority, date, time, host, message, seq)
VALUES ( '$FACILITY', '$PRIORITY', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$HOST', '$MESSAGE', '$SEQ');\n") template-escape(yes));
};

log { source(src); destination(named_pipe); }; 
It is in the .conf.in file because I suppose you're not supposed to update the original, anymore.

/usr/local/sbin/syslog-ng.sh

Code: Select all

#!/bin/bash

if [ -e /var/log/mysql.pipe ]; then
	while [ -e /var/log/mysql.pipe ]
		do
			mysql -u <myun>--password=<mypw> syslog < /var/log/mysql.pipe
		done
	else
		mkfifo /var/log/mysql.pipe
fi

#!/bin/bash

When I execute the code it just kind of hangs, and I can't seem to be able to view the mysql.pipe file in /var/log. Syslog does not seem to be picking anything up, either.

I tried running the script then restarting the syslog service, turning off syslog then running the script followed by turning it back on, etc. So, now I wait!

Just wondering if anything looks funky... besides the syslog-ng.conf.in thing.

Any suggestions?

Thank you all, again!
harner
Cacti User
Posts: 75
Joined: Tue Oct 17, 2006 10:21 am
Location: PA, USA

Post by harner »

I was just doing some basic troubleshooting, and there is no data in the database's tables.

:(

So, it is not piping, yet the script tells it to. Hmm...
harner
Cacti User
Posts: 75
Joined: Tue Oct 17, 2006 10:21 am
Location: PA, USA

Post by harner »

So, I decided to just change syslog-ng.conf and syslog-ng.conf.in to:
syslog-ng.conf.OLD and syslog-ng.conf.in.OLD and add the "old" config from my other box that crashed in there. I thought it would conflict going from SUSE 10.0 to 10.1 and usign different version of the plugin. Apparently, it works fine now.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest