hello,<br>
<br>
<br>
i'm having trouble with the template i created to pipe to mysql
(acording to php-syslog-ng), at first it was working fine but then (i
started messing around) and it just stop working, i had configure
syslog-ng to store logs coming from server A into mysql and on a text
file, here's  my syslog-ng.conf:<br>
<br>
  ## Log syslog-ng to mysql database<br>
  ##<br>
        destination d_mysql {<br>
          pipe("/tmp/mysql.pipe"<br>
          template("INSERT
INTO logs (host, facility, priority, level, tag, date, time, program,
msg) VALUES ( '$HOST', '$FACILITY', '$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>
#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>
it actually worked, but i don't know what i did, i see the logs coming
from server A (#tcpdump host server A and port 514) but it doesn't
store them on mysql...<br>
<br>
help please!!!<br><br>-- <br>Ciao,Javier<br>linux user #393724