hello,<br>
<br>
i'm getting an error when trying to start the syslog-ng server...<br>
<br>
here's the error:<br>
<br>
[root@monitor-2 etc]# /etc/init.d/syslog-ng start<br>
Starting system logger: parse error at 16<br>
Parse error reading configuration file, exiting.<br>
[FAILED]<br>
Starting kernel logger:<br>
[root@monitor-2 etc]#<br>
<br>
here's the syslog-ng.conf file:<br>
<br>
#<br>
# Configuration file for syslog-ng under Debian<br>
#<br>
# attempts at reproducing default syslog behavior<br>
<br>
# the standard syslog levels are (in descending order of priority):<br>
# emerg alert crit err warning notice info debug<br>
# the aliases "error", "panic", and "warn" are deprecated<br>
# the "none" priority found in the original syslogd configuration is<br>
# only used in internal messages created by syslogd<br>
<br>
## Log syslog-ng to mysql database<br>
##<br>
destination d_mysql {<br>
pipe("/tmp/mysql.pipe"<br>
<span style="font-style: italic; text-decoration: underline;">template("INSERT
INTO logs (host, facility, priority, level, tag, date, time, program,
msg) VALUES ( '$HOST', '$FACILITY',---line 16</span> '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n") template-escape(yes));<br>
};<br>
log { source(net); destination(d_mysql); };<br>
<br>
## Log on to text file<br>
##<br>
destination hosts {<br>
file("/var/log/$HOST.$FACILITY"<br>
owner(root) group(root) perm(0600) dir_perm(0700)<br>
create_dirs(yes));<br>
};<br>
<br>
log {source(net); destination(hosts); };<br>
<br>
## Log on to text file<br>
##<br>
destination hosts {<br>
file("/var/log/messages");<br>
};<br>
<br>
log {source(net); destination(hosts); };<br>
<br>
<br>
#Then comment out this line --<br>
<br>
# This is the default behavior of sysklogd package<br>
# Logs may come from unix stream, but not from another machine.<br>
#<br>
#source src { unix-dgram("/dev/log"); internal(); };<br>
<br>
#Then uncomment out this line --<br>
<br>
# If you wish to get logs from remote machine you should uncomment<br>
# this and comment the above source line.<br>
source src { unix-dgram("/dev/log"); internal(); };<br>
source net { udp(); };<br>
<br>
######<br>
# options<br>
<br>
options {<br>
# disable the chained hostname format in logs<br>
# (default is enabled)<br>
chain_hostnames(0);<br>
<br>
# the time to wait before a died connection is re-established<br>
# (default is 60)<br>
time_reopen(10);<br>
<br>
# the time to wait before an idle destination file is closed<br>
# (default is 60)<br>
time_reap(360);<br>
<br>
# the number of lines buffered before written to file<br>
# you might want to increase this if your disk isn't catching with<br>
# all the log messages you get or if you want less disk activity<br>
# (say on a laptop)<br>
# (default is 0)<br>
#sync(0);<br>
<br>
# the number of lines fitting in the output queue<br>
log_fifo_size(2048);<br>
<br>
# enable or disable directory creation for destination files<br>
create_dirs(yes);<br>
<br>
# default owner, group, and permissions for log files<br>
# (defaults are 0, 0, 0600)<br>
#owner(root);<br>
group(adm);<br>
perm(0640);<br>
<br>
# default owner, group, and permissions for created directories<br>
# (defaults are 0, 0, 0700)<br>
#dir_owner(root);<br>
#dir_group(root);<br>
dir_perm(0755);<br>
<br>
# enable or disable DNS usage<br>
# syslog-ng blocks on DNS queries, so enabling DNS may lead to<br>
# a Denial of Service attack<br>
# (default is yes)<br>
use_dns(no);<br>
<br>
# maximum length of message in bytes<br>
# this is only limited by the program listening on the /dev/log Unix<br>
# socket, glibc can handle arbitrary length log messages, but -- for<br>
# example -- syslogd accepts only 1024 bytes<br>
# (default is 2048)<br>
#log_msg_size(2048);<br>
};<br>
<br>
<br>
######<br>
# sources<br>
<br>
# all known message sources<br>
source s_all {<br>
# message generated by Syslog-NG<br>
internal();<br>
# standard Linux log source (this is the default place for the syslog()<br>
# function to send logs to)<br>
unix-stream("/dev/log");<br>
# messages from the kernel<br>
file("/proc/kmsg" log_prefix("kernel: "));<br>
# use the above line if you want to receive remote UDP logging messages<br>
# (this is equivalent to the "-r" syslogd flag)<br>
# udp();<br>
};<br>
<br>
<br>
######<br>
# destinations<br>
<br>
# some standard log files<br>
destination df_auth { file("/var/log/auth.log"); };<br>
destination df_syslog { file("/var/log/syslog"); };<br>
destination df_cron { file("/var/log/cron.log"); };<br>
destination df_daemon { file("/var/log/daemon.log"); };<br>
destination df_kern { file("/var/log/kern.log"); };<br>
destination df_lpr { file("/var/log/lpr.log"); };<br>
destination df_mail { file("/var/log/mail.log"); };<br>
destination df_user { file("/var/log/user.log"); };<br>
destination df_uucp { file("/var/log/uucp.log"); };<br>
<br>
# these files are meant for the mail system log files<br>
# and provide re-usable destinations for {mail,cron,...}.info,<br>
# {mail,cron,...}.notice, etc.<br>
destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };<br>
destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };<br>
destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };<br>
destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };<br>
destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };<br>
<br>
# these files are meant for the news system, and are kept separated<br>
# because they should be owned by "news" instead of "root"<br>
destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };<br>
destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };<br>
destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };<br>
<br>
# some more classical and useful files found in standard syslog configurations<br>
destination df_debug { file("/var/log/debug"); };<br>
destination df_messages { file("/var/log/messages"); };<br>
<br>
# pipes<br>
# a console to view log messages under X<br>
destination dp_xconsole { pipe("/dev/xconsole"); };<br>
<br>
# consoles<br>
# this will send messages to everyone logged in<br>
destination du_all { usertty("*"); };<br>
<br>
<br>
######<br>
# filters<br>
<br>
# all messages from the auth and authpriv facilities<br>
filter f_auth { facility(auth, authpriv); };<br>
# all messages except from the auth and authpriv facilities<br>
filter f_syslog { not facility(auth, authpriv); };<br>
<br>
# respectively: messages from the cron, daemon, kern, lpr, mail, news, user,<br>
# and uucp facilities<br>
filter f_cron { facility(cron); };<br>
filter f_daemon { facility(daemon); };<br>
filter f_kern { facility(kern); };<br>
filter f_lpr { facility(lpr); };<br>
filter f_mail { facility(mail); };<br>
filter f_news { facility(news); };<br>
filter f_user { facility(user); };<br>
filter f_uucp { facility(uucp); };<br>
<br>
# some filters to select messages of priority greater or equal to info, warn,<br>
# and err<br>
# (equivalents of syslogd's *.info, *.warn, and *.err)<br>
filter f_at_least_info { level(info..emerg); };<br>
filter f_at_least_notice { level(notice..emerg); };<br>
filter f_at_least_warn { level(warn..emerg); };<br>
filter f_at_least_err { level(err..emerg); };<br>
filter f_at_least_crit { level(crit..emerg); };<br>
<br>
# all messages of priority debug not coming from the auth, authpriv, news, and<br>
# mail facilities<br>
filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };<br>
<br>
# all messages of info, notice, or warn priority not coming form the auth,<br>
# authpriv, cron, daemon, mail, and news facilities<br>
filter f_messages {<br>
level(info,notice,warn)<br>
and not facility(auth,authpriv,cron,daemon,mail,news);<br>
};<br>
<br>
# messages with priority emerg<br>
filter f_emerg { level(emerg); };<br>
# complex filter for messages usually sent to the xconsole<br>
filter f_xconsole {<br>
facility(daemon,mail)<br>
or level(debug,info,notice,warn)<br>
or (facility(news)<br>
and level(crit,err,notice));<br>
};<br>
<br>
<br>
######<br>
# logs<br>
# order matters if you use "flags(final);" to mark the end of processing in a<br>
# "log" statement<br>
<br>
# these rules provide the same behavior as the commented original syslogd rules<br>
<br>
#
auth,authpriv.*
/var/log/auth.log<br>
log {<br>
source(s_all);<br>
filter(f_auth);<br>
destination(df_auth);<br>
};<br>
<br>
# *.*;auth,authpriv.none -/var/log/syslog<br>
log {<br>
source(s_all);<br>
filter(f_syslog);<br>
destination(df_syslog);<br>
};<br>
<br>
# this is commented out in the default syslog.conf<br>
#
cron.*
/var/log/cron.log<br>
#log {<br>
# source(s_all);<br>
# filter(f_cron);<br>
# destination(df_cron);<br>
#
daemon.*
-/var/log/daemon.log<br>
log {<br>
source(s_all);<br>
filter(f_daemon);<br>
destination(df_daemon);<br>
};<br>
<br>
#
kern.*
-/var/log/kern.log<br>
log {<br>
source(s_all);<br>
filter(f_kern);<br>
destination(df_kern);<br>
};<br>
<br>
#
lpr.*
-/var/log/lpr.log<br>
log {<br>
source(s_all);<br>
filter(f_lpr);<br>
destination(df_lpr);<br>
};<br>
<br>
#
mail.*
-/var/log/mail.log<br>
log {<br>
source(s_all);<br>
filter(f_mail);<br>
destination(df_mail);<br>
};<br>
<br>
#
user.*
-/var/log/user.log<br>
log {<br>
source(s_all);<br>
filter(f_user);<br>
destination(df_user);<br>
};<br>
<br>
#
uucp.*
/var/log/uucp.log<br>
log {<br>
source(s_all);<br>
filter(f_uucp);<br>
destination(df_uucp);<br>
};<br>
<br>
#
<a href="http://mail.info">mail.info</a>
-/var/log/mail.info<br>
log {<br>
source(s_all);<br>
filter(f_mail);<br>
filter(f_at_least_info);<br>
destination(df_facility_dot_info);<br>
};<br>
#
mail.warn
-/var/log/mail.warn<br>
log {<br>
source(s_all);<br>
filter(f_mail);<br>
filter(f_at_least_warn);<br>
destination(df_facility_dot_warn);<br>
};<br>
<br>
#
mail.err
/var/log/mail.err<br>
log {<br>
source(s_all);<br>
filter(f_mail);<br>
filter(f_at_least_err);<br>
destination(df_facility_dot_err);<br>
};<br>
<br>
#
news.crit
/var/log/news/news.crit<br>
log {<br>
source(s_all);<br>
filter(f_news);<br>
filter(f_at_least_crit);<br>
destination(df_news_dot_crit);<br>
};<br>
<br>
#
news.err
/var/log/news/news.err<br>
log {<br>
source(s_all);<br>
filter(f_news);<br>
filter(f_at_least_err);<br>
destination(df_news_dot_err);<br>
};<br>
<br>
#
news.notice
/var/log/news/news.notice<br>
log {<br>
source(s_all);<br>
filter(f_news);<br>
filter(f_at_least_notice);<br>
destination(df_news_dot_notice);<br>
};<br>
<br>
<br>
# *.=debug;\<br>
# auth,authpriv.none;\<br>
# news.none;mail.none -/var/log/debug<br>
log {<br>
source(s_all);<br>
filter(f_debug);<br>
destination(df_debug);<br>
};<br>
<br>
<br>
# *.=info;*.=notice;*.=warn;\<br>
# auth,authpriv.none;\<br>
# cron,daemon.none;\<br>
#
mail,news.none
-/var/log/messages<br>
log {<br>
source(s_all);<br>
filter(f_messages);<br>
destination(df_messages);<br>
};<br>
<br>
#
*.emerg
*<br>
log {<br>
source(s_all);<br>
filter(f_emerg);<br>
destination(du_all);<br>
};<br>
<br>
<br>
# daemon.*;mail.*;\<br>
# news.crit;news.err;news.notice;\<br>
# *.=debug;*.=info;\<br>
# *.=notice;*.=warn |/dev/xconsole<br>
log {<br>
source(s_all);<br>
filter(f_xconsole);<br>
destination(dp_xconsole);<br>
};<br>
<br>
does anybody know why?....<br>
<br>
thanx...!!!<br>
<br><br>-- <br>Ciao,Javier<br>linux user #393724