Log to Database Event Handler

Javier Garcia jgarcia at suse.com.ve
Tue Apr 13 05:34:04 CEST 2004



Hi David,

why you dont compile nagios with mysql support?

j.

----
Javier Garcia
SuSE Linux C.A.
jgarcia at suse.com.ve
0416-8678334


On Wed, 7 Apr 2004, David Barnett wrote:

> Can someone please post a command that will be an event handler that
> logs the date, time, host, service, state, and output to a mysql
> database?
>
> I have tried:
>
> /usr/bin/mysql -D <db_name> --execute 'INSERT into <table_name>
> (date,time,host,service,state,output) VALUES($DATE$,$TIME$,$HOSTNAME$,
> $SERVICEDESC$,$SERVICESTATE$,$OUTPUT$)'
>
> but that doesn't work and I can't find any error log.  The Nagios event
> log says the event handler happened, but nothing gets put into the
> table.  Thanks for any help
>
>
>
> David
>
>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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