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

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

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

Glad I could help.

0 Karma

TwistTheNeil
New Member

Wow, thank you!

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...