Log to Database Event Handler

David Barnett DavidB at etobin.com
Wed Apr 7 21:29:14 CEST 2004


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040407/10f89f3c/attachment.html>


More information about the Users mailing list