Splunk Search

Splunk search for field values in multiple sources

infotork
Explorer

There are two sourcetypes ,

sourcetype=A  sourcetype=B  and we have extracted a field "login" in both sourcetypes

1. we need to have a "count"  of the login values which are available in sourcetype=A but not in sourcetype=B

2. we need to have a "list of values"  of the login values which are available in sourcetype=A but not in sourcetype=B

3. Any Graph that we can show the these many "login" are missing in compare with sourcetypes using timechart? - any suggestions?

Labels (3)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
sourcetype="A" OR sourcetype="B"
| eval sourcetypeA=if(sourcetype="A",sourcetype,null)
| eval sourcetypeB=if(sourcetype="B",sourcetype,null)
| stats values(sourcetypeA) as sourcetypeA values(sourcetypeB) as sourcetypeB by login
| where sourcetypeA="A" and isnull(sourcetypeB)
| stats count
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...