Getting Data In

Extract "user" ID from monitor "fschange" event

vpsmax
Path Finder

Hello.

We are currently looking to utilize Splunk for monitoring a few configuration files on a server.  To do that, we have added the following stanza to the inputs.conf file ...

[fschange:C:\Splunk test\Test File 1.txt]
pollPeriod = 30
signedaudit = false
index = <index_name>
sourcetype = test:file:1
fullEvent=true

When searching using the following SPL search ...

index=<index_name> | head 10 | table path action modtime host source sourcetype

The data ingested looks good.  That is, we are getting details on when the change occurred as well as the changes made from within the file.  But one field seems to be missing.  Using the "fschange" stanza, how can we also get "user" data (ie. who was the one making the update)?

Regards,
Max

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Based on this answer https://community.splunk.com/t5/Getting-Data-In/can-splunk-monitor-fschange/td-p/417518 you should add uid and gid to your table. And remember that fschange is deprecated feature and it will be removed in future!

r. Ismo

0 Karma

vpsmax
Path Finder

Thanks for your response.  I do get gid=-1 and uid=-1 from the event below ...

Mon Aug 24 18:45:36 2020 action=update, path="C:\Splunk test\Test File 2.txt", isdir=0, size=69, gid=-1, uid=-1, modtime="Mon Aug 24 18:45:27 2020", mode="rwxrwxrwx", hash=, chgs="modtime "

How can one extract a "user" from these fields?

 

0 Karma

vpsmax
Path Finder

Actually, I was able to find the answer.  To find the User ID, run "id -u".  To find the Group ID, run "id -g".  We are using Windows.  Thanks!

 

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...