log to database

Sandoval, Julio jsandoval at achs.cl
Wed Feb 2 00:19:56 CET 2005


Thank,
I´m not familiarized with developer script, but i have been looking for documentation without success

I really need to have availability of a hostgroup considering down when one or more host are down. 
For this i thought to turn logfile to database.

Can you help me?
Thank!
Julio



-----Mensaje original-----
De: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]En nombre de Andreas
Ericsson
Enviado el: Martes, 01 de Febrero de 2005 17:54
Para: nagios-users at lists.sourceforge.net
Asunto: Re: [Nagios-users] log to database


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


"Este mensaje y cualquier archivo adjunto es confidencial y está destinado a la persona o entidad a quién ha sido dirigido. Si usted no es el receptor individualizado en el mismo, le solicitamos notificar de ello al remitente de manera inmediata, estando prohibido y sancionado por la ley cualquier almacenamiento, divulgación, distribución o copia de su contenido."


More information about the Users mailing list