All Apps and Add-ons

MySQLMonitor

nycct3
New Member

Having difficulty with a class project. We have a Splunk server put up on a windows server 2008 machine. Looking to pull data from a remote MySQL database on the same network. We wanted to know where the configuration file was to use the MySQLMonitor and record the reads and writes of the database.

0 Karma

bonito
Explorer

Hi,

The MySQL monitor app has no ability to log reads and writes to the database in any detail, although it can count the number of select/insert/update/delete queries. The MySQL monitor app has a welcome screen that gives the basic instructions on how to configure it, which will include this functionality.

The two ways I can think of to do anything more complicated -- such as auditing every query:

  1. Enable the general query log, which logs all activity to the database (and can slow it down, as well as use a lot of space). There's no existing Splunk config for this that I know of.
  2. Use the MySQL proxy to intercept queries and log them to Splunk. This should be faster and you can do more fancy things such as only log one in every 10 queries -- which may be enough if you are just looking for more statistical information.

I've put an example MySQL proxy script that can send data to Splunk here: http://pastebin.com/7QUjMhPb. It's definitely incomplete -- it just logs to stdout rather than sending data to a TCP port like I originally intended. I don't know if it works any more -- this is from a couple of years back that never made it into production and I can't really provide any support as I no longer have any idea how it all fits together.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...