Splunk Search

Is there a way to get the number to only show if it sees an account rather than account and every log associated with it

supersnedz
Path Finder

Hello all, im looking to create a dashboard for certain accounts. I have a list of 20 accounts that need to be monitored if they are logging in or not. I did a stats count and can see all the accounts however putting this into a single value visualization shows a count for all the logs so its showing as millions as its counting each log for the accounts. 

Is there a way to get the number to only show if it sees an account rather than account and every log associated with it, I should only have a max of 20.

Thank you

Labels (3)
0 Karma
1 Solution

srauhala_splunk
Splunk Employee
Splunk Employee

To not search events from all account you could use a csv file as a base for your search filter. The subsearch will output the result of accounts.csv in the form ((account="account_1") OR (account="account_2") etc )

 

index=my_index_with_account_data 
  [| inputlookup accounts.csv
   | table account
   | format]
| table _time, account, * 

 

/Seb 

View solution in original post

srauhala_splunk
Splunk Employee
Splunk Employee

To not search events from all account you could use a csv file as a base for your search filter. The subsearch will output the result of accounts.csv in the form ((account="account_1") OR (account="account_2") etc )

 

index=my_index_with_account_data 
  [| inputlookup accounts.csv
   | table account
   | format]
| table _time, account, * 

 

/Seb 

supersnedz
Path Finder

Thank you for this! works perfectly 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats count by account
| stats count
Get Updates on the Splunk Community!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...