Splunk Search

_audit - see users behavior - users searches by sourcetypes

egreibl
Engager

Hi guys,
hope you can help me.
I want to have a statistic of my users. The most of the users access the search&reporting app and not a specific app. So, I want to have a report about the sourcetypes they are looking for. Example:
user XY searched sourcetype ZZ 4 times per day

thanks for your help.
Cheers, Lisi

0 Karma
1 Solution

inventsekar
Ultra Champion

this gives the Sourcetypes and indexes and usernames.

index=_audit action=search search=* sourcetype=audittrail  search=* search_id=* NOT (user=splunk-system-user ) | rex field=search "sourcetype\s*=\s*\"*(?<SourcetypeUsed>[^\s\"]+)"  | rex field=search "index\s*=\s*\"*(?<IndexUsed>[^\s\"]+)" | table _time user search SourcetypeUsed IndexUsed

View solution in original post

0 Karma

David
Splunk Employee
Splunk Employee

Unfortunately reporting on implicit sourcetypes or indexes is not possible, unless there is new auditing added in 6.5. The answer given by inventsekar is as close as you will come.

0 Karma

inventsekar
Ultra Champion

this gives the Sourcetypes and indexes and usernames.

index=_audit action=search search=* sourcetype=audittrail  search=* search_id=* NOT (user=splunk-system-user ) | rex field=search "sourcetype\s*=\s*\"*(?<SourcetypeUsed>[^\s\"]+)"  | rex field=search "index\s*=\s*\"*(?<IndexUsed>[^\s\"]+)" | table _time user search SourcetypeUsed IndexUsed
0 Karma

egreibl
Engager

Hi,

thanks for your answer.
But what I am looking also for users who only search e.g. "ip X.X.X." so, they do not enter explicit the sourcetype. Maybe it is possible to search by the roles? because then I can identify between the different accessrights and therefore which sources where searched how often.

to search for the field "role" it's not possible. do you know the field for "Roles"?
thanks

0 Karma

inventsekar
Ultra Champion

"role" is not available.
---- But what I am looking also for users who only search e.g. "ip X.X.X." so, they do not enter explicit the sourcetype ----
are you looking for users who search without explicit sourcetype?

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 ...