Splunk Search

How would i combine the two outputs?

TwistTheNeil
New Member

I'm trying to use the stats function to list out values in a field

In the 1st image, I have the following search:
type=USER_AUTH res=failed | dedup _raw | stats count as "Failed attempts", values(dest) as "Failed on servers" by acct
http : //postimg . org/ image/ 714eq18rn/

How would i get the number of times the user failed to login to each server along with the server name?
For example, i click on the 1st user and the field shows me this
http : //postimg .org/ image/ cx4yifa8h/
(The values are actually server names)

I would like to have an output like this
acct Failed attempts Failed on servers
1 acct1 15 server1 (5)
server2 (5)
server3 (2)

and so on.

Does anyone know how i would get this?

Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Try following

type=USER_AUTH res=failed | dedup _raw | stats count  by acct, dest | eval dest=dest." (".count.") | stats sum(count) as "Failed attempts", values(dest) as "Failed on servers" by acct

View solution in original post

TwistTheNeil
New Member

Yup, it's been resolved. Thank you though!

0 Karma

lukejadamec
Super Champion

Failed attempts for acct1 should be 12, right?

0 Karma

somesoni2
Revered Legend

Try following

type=USER_AUTH res=failed | dedup _raw | stats count  by acct, dest | eval dest=dest." (".count.") | stats sum(count) as "Failed attempts", values(dest) as "Failed on servers" by acct

somesoni2
Revered Legend

Glad I could help.

0 Karma

TwistTheNeil
New Member

Wow, thank you!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...