Getting Data In

Monitoring a config file, index only the changes

Azunai
Loves-to-Learn Lots

Hello there,

First off, im new to Splunk and im evaluating  if all our auditing / monitoring / reporting needs can be satisfied by splunk.

My test setup is 1x Enterprise standalon + 1 universal forwarder on 2 different machines.

Im currently trying to audit changes on a configuration file, idealy i'd like to log which user changed it, and what exactly was changed.

For a start i tried :

 

[monitor://C:\Tests\Splunk\Audit_Config_Test\test.conf]
sourcetype = config_audit
disabled = false
interval = 10

 

 

 Which lets splunk index either the compelte file if a change was made somewhere, or only the last line of it, if something was appended. Is there any way to only index the actual changes? If not, that it always indexes the whole file?

As for the user changing the file, does splunk come with tools to figure that out or do i need to script something myself?

The final goal is to achieve  transparency and traceability in case anything happens somewhere in the future.

Labels (3)
0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @Azunai 

You must be using Splunk UF in your case to monitor the file configured, Splunk ensures ingest latest updates and no duplicate data being ingested (if you are interested check for fishbucket in docs). Having said that It doesn't ingest whole file for every change and only ingest new lines appended to file. 

Example:

test.conf

---------------

03/06/2021 10:00:00 Line1-data-feed

03/06/2021 10:01:00 Line2-data-feed

03/06/2021 10:02:00 Line3-data-feed

If some one changed test.conf and then file gets updated/appeded here with - 03/06/2021 10:03:00 Line4-data-feed . UF ensures only ingest this latest change.

Affectively when you search in Splunk SH UI - You will get following output:

03/06/2021 10:00:00 Line1-data-feed

03/06/2021 10:01:00 Line2-data-feed

03/06/2021 10:02:00 Line3-data-feed

03/06/2021 10:03:00 Line4-data-feed

---------

An upvote would be appreciated if it helps!

Tags (2)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...