Mysql – Windows Event Log export to MySQL DB

MySQLwindows-event-log

I have windows 2008 R2 server. Is there any way all events can be logged in my linux base mysql database ?
or is there any way i can log specific event in mysql tables?

Best Answer

The Windows Event Log system does not support logging to a SQL database by default - it always will log into locally-accessible files, only the destination directory and the file name are configurable via registry values1.

Server 2008 R2 and newer OS versions come with a Windows Event collector which can be configured to forward events to another Windows host, but cannot convert the data to be passed on into a database.

But of course, you are free to use any script - either rolled on your own or created by someone else - which might do exactly this: reading data from the event log and writing rows into a database. There are numerous examples on the net on how this might look like.

You also might consider using a complete log management solution designed to the very purpose of collecting, storing, analyzing and presenting the logs. The market is flooded with products - choose one that you think makes a good fit.


1 Each event log facility reads from the key HKLM\SYSTEM\CurrentControlSet\Services\EventLog\<logname> and the value of File (REG_EXPAND_SZ) represents the