Splunk Search

Multiple fields in a string search

nanomatical
New Member

Hey Guys,

This is my search:

index=nexus RNA-IVS "login failed" | timechart count

which gives
time 8pm
count 63

I need to search for two strings so that i get :
time 8pm
count(login failed): 63
count(login passed) 23

Please assist 😞

Regards

Tags (1)
0 Karma

FritzWittwer_ol
Contributor

Try

index=nexus RNA-IVS |  rex field=_raw ".*login (?<logstate>\s+).*" | timechart count by logstate

you probably have to adjust the regular expression

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...