Help with Syslog Plugin : no display of messages in cacti

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
r_chetanjain
Cacti User
Posts: 83
Joined: Fri Aug 22, 2003 4:33 am

Help with Syslog Plugin : no display of messages in cacti

Post by r_chetanjain »

I am not able to view any messages in cacti...

Syslog-ng.conf
-----------------

options {
sync (0);
time_reopen (10);
log_fifo_size (1000);
long_hostnames (off);
use_dns (no);
use_fqdn (no);
create_dirs (no);
keep_hostname (yes);
};

#source s_sys {
# file ("/proc/kmsg" log_prefix("kernel: "));
# unix-stream ("/dev/log");
# internal();
# udp(ip(0.0.0.0) port(514));
# };

source net { udp(); };

destination d_mysql {
pipe("/var/log/mysql.pipe"
template("INSERT INTO syslog_incoming
(facility, priority, date, time, host, message, seq, status)
VALUES ( '$FACILITY', '$PRIORITY', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$HOST', '$MSG', '$SEQ', '$STATUS' );\n") template-escape(yes));
};

destination messages { file("/var/log/messages"); };
destination kern { file("/var/log/kern.log"); };


log { source(net); destination(d_mysql); };
--------------------------------------------------------------------------------
My script

#!/bin/bash

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

--------------------------------------------------------------------------------

Output of /var/log/mysql.pipe

INSERT INTO syslog_incoming
(facility, priority, date, time, host, message, seq, status)
VALUES ( 'local6', 'info', '2007-12-08', '12:10:47', '10.115.1.2', 'USER: admin logged in through telnet (10.4.114.16)', '', '' );
INSERT INTO syslog_incoming
(facility, priority, date, time, host, message, seq, status)
VALUES ( 'local6', 'info', '2007-12-08', '12:10:51', '10.115.1.2', 'SYST: 10.4.114.16 admin: clear counters', '', '' );
------------------------------------------------------------------------------

But i can't view any messages in Cacti... Help me


Chetan
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Post by chrisgapske »

Neew more intel.

What version of Cacti a what version of syslog are you running.

Is there anything in the syslog database in the incomming table?

how are you running your script ?
davidvd
Posts: 4
Joined: Sat Aug 02, 2008 7:26 pm

Post by davidvd »

I don't have any message in cacti, but I have the data in the DB.

I use the latest version of the pluggin.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests