log to database

Andreas Ericsson ae at op5.se
Tue Feb 1 22:53:57 CET 2005


Sandoval, Julio wrote:
> Consider list,
> 
> I need to tranform the log [nagios.log] to database...is this
> posible? I can´t lose any information of nagios.log....
> 

Ofcourse it's possible. Without checking the log format myself, I 
believe you would need something along the lines of three or four flat 
tables and a clever shell script. Start with
sed 's/^.\([0123456789]*\)] /\1;/' nagios.log > clean.log
and you're halfway there. Then you can simply grep the in-data for the 
different tables out of it and use a LOAD DATA INFILE in mysql (or 
something similar in postgresql, although I'm not equally familiar with 
that).

> I read the nagios documentation, but i don´t need compile new
> configuration else to turn my old configuration with database..
> 

That I don't understand. Sorry. If you meant configuration from the 
start (as opposed to logfile) you're out of luck as far as simplicity 
goes. It would take something more robust to do that.

> please, it´s is very important for my.
> 

Then pay someone to do it for you. It usually pays off if the guy/girl 
you're hiring knows what they're doing.

> thank, Julio Sandoval Schwartzmann
> 
-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list