Splunk Search

How do I filter through my auth logs via search to only return "Accepted" or "Failed" login attempts?

sympatiko
Communicator

Hi splunkers,

I need to gather the success and failed attempts from my linux servers, but when I forward all my auth logs, it shows me so many types of logs. How can I get only those "Accepted" or "Failed" attempts?

Thanks,

Tags (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You need to tell Splunk what you want to see. To give a complete answer, we would need to see samples of your logs, but you could start with something like this:

index=foo ("Accepted" OR "Failed") 

If you put that text into the search box you should get all the events that contain either "Accepted" or "Failed". Of course, you should change "foo" to the name of the index in which you store your log events. Once you see the desired events you can refine the search to extract the data you need to produce a report.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

You need to tell Splunk what you want to see. To give a complete answer, we would need to see samples of your logs, but you could start with something like this:

index=foo ("Accepted" OR "Failed") 

If you put that text into the search box you should get all the events that contain either "Accepted" or "Failed". Of course, you should change "foo" to the name of the index in which you store your log events. Once you see the desired events you can refine the search to extract the data you need to produce a report.

---
If this reply helps you, Karma would be appreciated.

sympatiko
Communicator

This is the solution. I never thought its that simple 😃 . Thanks for your time.

Have a great day!

0 Karma
Get Updates on the Splunk Community!

Explore the Latest Educational Offerings from Splunk [January 2025 Updates]

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...