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 Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...