Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 22, 2017 2:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Syslog (syslog-ng.conf) example
PostPosted: Sun Jun 04, 2017 6:49 am 
Offline

Joined: Sun Jun 04, 2017 6:25 am
Posts: 10
Hi!

After CACTI update from 0.8x to 1.1.7 version (Debian8+MySql 5.5.54), Not work syslog-ng rightly, Not show syslog message in webpage, but show Syslog Message Filter [ Start: '2017-06-02 05:39' to End: '2017-06-04 05:39', Unprocessed Messages: 3
After test syslog sending (udp:514)

My syslog-ng.conf :
@version: 3.1
#Bare minimum syslog-ng configuration

options { long_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
owner("root"); group("adm"); perm(0640); stats_freq(0);
bad_hostname("^gconfd$");
};

# we are using udp, and this is a collector for net traffic only
#
source s_all {
udp();
# internal();
# unix-stream("/dev/log");
# file("/proc/kmsg" log_prefix("kernel: "));
};

destination d_mysql {
sql(type(mysql)
host("localhost") username("root") password("password")
database("syslog")
table("syslog_incoming")
columns("facility", "priority", "date", "time", "host", "message")
values("$FACILITY", "$PRIORITY", "$YEAR-$MONTH-$DAY", "$HOUR:$MIN:$SEC", "$HOST_FROM", "$MSG")
indexes("facility", "priority", "date", "time", "host", "msg"));
};

log {
source(s_all);
destination(d_mysql);
};


Maybe for problem resolved need changes in syslog-ng.conf ?
Please show my, full working syslog-ng.conf for cacti 1.1.7+ Mysql


Top
 Profile  
 
 Post subject: Re: Syslog (syslog-ng.conf) example
PostPosted: Sun Jun 04, 2017 2:34 pm 
Offline

Joined: Fri Jun 02, 2017 4:15 pm
Posts: 4
try this

destination d_mysql {
sql(type(mysql)
host("localhost") username("root") password("password")
database("cactidb") table("syslog_incoming")
columns("facility_id", "priority_id", "program", "date", "time", "host", "message")
values("$FACILITY_NUM","$LEVEL_NUM","$PROGRAM","$YEAR-$MONTH-$DAY","$HOUR:$MIN:$SEC","$HOST","MSGONLY"));
};

if it doesnt work with your syslog db create a cactidb database like in the example


Top
 Profile  
 
 Post subject: Re: Syslog (syslog-ng.conf) example
PostPosted: Tue Jun 06, 2017 7:45 am 
Offline

Joined: Sun Jun 04, 2017 6:25 am
Posts: 10
No, not work :(
I reinstall syslog plugin, and recreate syslog DB + import tables from syslog.sql

How to work syslog chain.
syslog-ng listen UDP:514, if recives syslog message, It send their to MySQL db syslog table ''syslog_incomming"

Whats happens next? Whats processing next? syslog plugins .PHP files or DB?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group