Logging, Syslog and Log Anaylsys Forums
March 11, 2010, 06:53:11 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
   Home   WIKI BLOG Help Search Recent Topics GoogleTagged Login Register  
Pages: [1]
  Print  
Author Topic: help for a beginner  (Read 951 times)
capnino
Newbie
*
Offline Offline

Posts: 1


View Profile
« on: May 27, 2009, 05:02:14 pm »

Hi there.
I have configured syslog-ng to get messages over UDP saving logs into a file, it works fine.
Now I have a problem, I need to store just the content of "$MSG" into  several fields of a mysql database table.
The content of my log file looks like this :

xxx;xxxxxx;1;xxxxx;2222|xxxxx;xxxxxxx;xxxxxx#xxxxx;xxxxxxx

As you can see I have 3 different kind of separators ";" "|" "#" and something like 10 different fields, this means that I have to split every row of my log file into a database table with 10 fields.

Any idea about how to solve my problem, thanks in advance.
Greetings
capnino
 
Logged
mutex
Administrator
Newbie
*****
Offline Offline

Posts: 895


View Profile
« Reply #1 on: May 28, 2009, 08:25:39 pm »

I am pretty sure there is a way to do this pretty easily.  give me a few days to get back from vacation and I'll hook you up.
Logged
Pages: [1]
  Print  
 
Jump to:  

Information Security News | Jerry Bell's blog | Enterprise IT | Tropical Fish Information | Tropical Fish Forums
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!