Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like some recommendations for the following problem. I use Ossec for log analysis. What I want, is after extracting the fields to save them in an Oracle database.

For example, if I have this line

IP:(\d+.\d+.\d+.\d+)@(\w+): (forcefield \w+); (.*)

I want $1 go to Ip tables, $2 to host, $3 to msg ... etc

For the moment I am considering to execute a script when I have a match, but I looking for a better approach if possible.


share|improve this question
This seems a good way to me tbh – Lucas Kauffman Apr 17 '12 at 12:58

I'm not sure how this is possible within ossec, but you can do it with nxlog (disclaimer: I'm affiliated with the project). It can write the fields to database using the om_dbi module.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.