How to split mesg by regex into fields defined in MySQL TBL?

General discussions here

Moderator: rgerhards

How to split mesg by regex into fields defined in MySQL TBL?

Postby Guest on Wed Nov 02, 2005 5:29 pm

Hello!
I wondering how to split syslog mesage into fields defined in MySQL Table b y regex.
For exapmle:

* regex for pix log is -
/from \(([\w\-\.]+)\) to ([\w\-\.]+) on interface ([\w\-]+)/
as we can see args $1,$2 is IP and $3 is name of interface.

* additional fields in SQL Table schema :
IPsrc, IPdst, interace.

How to insert regex args $1, $2,$3..$n into Mysql Database?
Guest
 

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Google Ads


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron