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!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...