Splunk Search

Find which hosts a user has not logged in to

gsd
New Member

Newbie here, so please be kind!

Not sure if this is even possible, but I need to find out if a user has never logged in to a host. So far I have this:

sourcetype="WMI:UserAccounts" user="Bob" | stats count by host

That gives me the hosts Bob has logged in to, but not the hosts that Bob has not logged in to (which is what I need).

Can this be done?

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Thinking about this a bit more, you should be able to do what the OP needs without a subsearch:

sourcetype="WMI:UserAccounts" | stats count(eval(User="Bob")) as bobcount by host | where bobcount=0

View solution in original post

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...