Splunk Search

How to build a query which would take input CSV file and search for logs?

shahidkhan545
New Member

I am importing signin logs from azure and I want to built a query which should take input from a csv file (appid)

and search logs and display output for number of success and failures of signins per app

Labels (6)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

@shahidkhan545 You need to explain the problem.  For starters, some sample data (anonymized) would help.  How do 'success' and 'failure' and 'appid' appear in the logs/events?  Are they in fields that are already extracted?  Suppose your event already comes with a field 'status' which can be 'success' or 'failure', and a field 'appid', you can count by something like

source = mysource
| stats count by appid status

 Why do you need a CSV file? (In other words, what is the structure and sample data in your CSV?)

Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...