better logon process

git-svn-id: http://www.observium.org/svn/observer/trunk@318 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-11-26 14:01:09 +00:00
parent e97df43c41
commit f33bca5e3e
8 changed files with 84 additions and 13 deletions

View File

@@ -23,12 +23,10 @@ source s_net {
udp();
};
destination d_mysql {
pipe("/var/log/observer-mysql.pipe"
template("INSERT INTO syslog
(host, facility, priority, level, tag, datetime, program, msg)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC','$PROGRAM', '$MSG' );\n") template-escape(yes));
};
destination d_mysql { program("/usr/bin/mysql -u<USER> -p<PASS> <DATABASE>" template("INSERT
INTO syslog (host, facility, priority, level, tag, datetime, program, msg)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n") template-escape(yes));
};
log {
source(s_net);