All Apps and Add-ons

Best way to index MYSQL entry in Splunk as soon as it appears in MYSQL

sssignals
Path Finder

Hi Splunk community

I have a MYSQL table where program A writes entries to it. Then program B deletes them after processing them. I want to index MYSQL entries in Splunk as soon as it appears in MYSQL.

I currently am using DB connect but I have not experimented it fully. What is the best way to index MYSQL entry in Splunk for my scenario?

Appreciate your thoughts on this. Many thanks in advance.

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi sssignals.
there are two choices:
you can use DB Connect and use an high check frequence for DB update; this solution has two problems: doesn't fully answer to your question because don't trigger events as soos as executed, but with the frequency you setted; in addition is heavy for the Splunk system and for DB server.

Second solution is heavyer:
you create on DB server a script that triggers events in MYSQL and writes on a file the triggered event; file is monitored by a Forwarder that sends triggered event to Splunk where there is a real time alert.
It's less heavy for Splunk server because a part of activity is performed by the DB Server without an overload for it because it has to execute queries in both the solutions, but need more work to implement (script, Forwarder installation and configuration).

Bye.
Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi sssignals.
there are two choices:
you can use DB Connect and use an high check frequence for DB update; this solution has two problems: doesn't fully answer to your question because don't trigger events as soos as executed, but with the frequency you setted; in addition is heavy for the Splunk system and for DB server.

Second solution is heavyer:
you create on DB server a script that triggers events in MYSQL and writes on a file the triggered event; file is monitored by a Forwarder that sends triggered event to Splunk where there is a real time alert.
It's less heavy for Splunk server because a part of activity is performed by the DB Server without an overload for it because it has to execute queries in both the solutions, but need more work to implement (script, Forwarder installation and configuration).

Bye.
Giuseppe

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...