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
Help with Syslog Plugin : no display of messages in cacti
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 83
- Joined: Fri Aug 22, 2003 4:33 am
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
Who is online
Users browsing this forum: No registered users and 3 guests