Hi<br>This is the first time I'm using syslog-ng and I'm trying to log all data to a mysql database ...<br>when I start the service I get the following errors ..<br><br>[root@greg syslog-ng]# service syslog-ng restart<br>Stopping syslog-ng: [FAILED]
<br>Starting syslog-ng: Warning: No source refers to internal messages, they'll go to /dev/null<br>unresolved reference: inputs<br>Error initializing configuration, exiting.<br> [FAILED]
<br>[root@greg syslog-ng]#<br><br><br>this is my config file<br><br># syslog-ng central log host configuration file<br>#<br>#<br>#<br>#####################################################################<br># General options
<br><br>options { check_hostname(yes);<br> keep_hostname(yes);<br> chain_hostnames(no); };<br><br># Other important general options<br><br># use_fqdn(yes);<br># sync(0);<br># keep_hostname(yes);<br># chain_hostnames(no);
<br># create_dirs(yes);<br><br>#####################################################################<br># Define syslog input stream<br># This is specific to Solaris 9<br><br>#source inputs { internal();<br># sun-streams("/dev/log" door("/var/run/syslog_door"));
<br># tcp(max_connections(1000)); };<br><br># For newer versions of Linux (Debian GNU/Linux woody,<br># and RedHat Linux post 7.0)<br>#<br>source stdlog { unix-dgram("/dev/log"); }; <<<<<<<<<<<<<<<< How should this be defined for fedora core ?
<br><br>#####################################################################<br># Define filters<br><br># Level Filters<br>filter f_emerg { level (emerg); };<br>filter f_alert { level (alert .. emerg); };<br>filter f_crit { level (crit .. emerg); };
<br>filter f_err { level (err .. emerg); };<br>filter f_warning { level (warning .. emerg); };<br>filter f_notice { level (notice .. emerg); };<br>filter f_info { level (info .. emerg); };<br>filter f_debug { level (debug .. emerg); };
<br><br># Facility Filters<br>filter f_kern { facility (kern); };<br>filter f_user { facility (user); };<br>filter f_mail { facility (mail); };<br>filter f_daemon { facility (daemon); };<br>filter f_auth { facility (auth); };
<br>filter f_syslog { facility (syslog); };<br>filter f_lpr { facility (lpr); };<br>filter f_news { facility (news); };<br>filter f_uucp { facility (uucp); };<br>filter f_cron { facility (cron); };<br>filter f_local0 { facility (local0); };
<br>filter f_local1 { facility (local1); };<br>filter f_local2 { facility (local2); };<br>filter f_local3 { facility (local3); };<br>filter f_local4 { facility (local4); };<br>filter f_local5 { facility (local5); };<br>filter f_local6 { facility (local6); };
<br>filter f_local7 { facility (local7); };<br><br># syslog-ng stats filter<br>filter f_n_stats { not match("STATS: dropped 0"); };<br><br># syslog-ng "connect from filter<br>filter f_n_connected { not match("AF_INET client connected from"); };
<br><br>#####################################################################<br># Define where the logs can be stored<br><br># Log log files<br>destination logpile {<br> file("/var/syslog-ng/$HOST/$YEAR/$MONTH/$FACILITY.$YEAR$MONTH$DAY"
<br> owner(root) group(root) perm(0600)<br> create_dirs(yes) dir_perm(0700)); };<br><br># Console log<br>destination console { file("/dev/sysmsg"); };<br><br># Linux Console<br># destination console { file("/dev/console"); };
<br><br># MySQL Database<br>destination d_mysql { pipe("/var/run/mysql.pipe"<br> template("INSERT INTO logs (host, facility,<br> priority, level, tag, date, time, program, msg)
<br> VALUES<br> ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG',<br> '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM',<br> '$MSG' );\n") template-escape(yes));
<br>};<br><br>#####################################################################<br># Define logging<br><br># Local log<br>log { source(inputs);<br> filter(f_n_stats);<br> filter(f_notice);<br> filter(f_n_connected);
<br> destination(logpile); };<br><br># Console<br>log { source(inputs);<br> filter(f_n_stats);<br> filter(f_err);<br> filter(f_n_connected);<br> destination(console); };<br><br># MySQL Database<br>
log { source(inputs);<br> filter(f_n_stats);<br> filter(f_notice);<br> filter(f_n_connected);<br> destination(d_mysql); };<br><br><br><br><br><br clear="all"><br>-- <br>Gregory Machin<br><a href="mailto:gregory.machin@gmail.com">
gregory.machin@gmail.com</a><br><a href="http://www.linuxpro.co.za">www.linuxpro.co.za</a>