Hello,

I’m using syslog-ng 2.0 rc4 with Php-Syslog-NG 2.9.2a on RHEL4 with MySQL 5.0.24a.

I’m feeding MySQL server through UNIX pipe and everything goes well – BUT I’ve got a few questions.

 

This is not strictly php-syslog-ng problem, as I’m also using syslog-ng in my setup (but naturally using php-syslog-ng database schema for MySQL), so I’ll ask here on this list anyway:

 

1.How can I configure syslog-ng to write decimal code of severity (see RFC3164) in column “level” (or “priority”) of table “logs” in database “syslog”? Is this possible to achieve somehow?

 

2. Why are we logging the same information twice (the same data gets written in column “priority” and “level”)?

 

The ideal setup would be to write decimal code of severity level in column “level” and corresponding word string (eg. info or warning or crit …) in column “priority”.

Using php-syslog-ng in this case, we could order syslog messages by priority properly (sql query … ORDER BY level ASC …. orders our messages by alphabetical order) 

Now we can’t (!!) because in ascending mode we get alert (character A) first and warning (character W) last, but we should get nice progression like: debug, info, notice, warning, error, crit, alert, emerg.

 

Just in case, I’m attaching a part of syslog-ng.conf file:

---------------------

destination d_mysql {

   pipe("/var/log/mysql.pipe"

      template("INSERT INTO logs

      (host, facility, priority, level, tag, datetime, program, msg)

      VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$R_YEAR-$R_MONTH-$R_DAY $R_HOUR:$R_MIN:$R_SEC',

      '$PROGRAM', '$MSG' );\n") template-escape(yes));

};

---------------------

 

 

Thanks for any info,

Tadej

 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Php-syslog-ng-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support

Reply via email to