Splunk Enterprise Security

Can you help me count the following two files?

logloganathan
Motivator

Hi, i have two files

| inputlookup ABC | stat count 
 result=10

| inputlookup XYZ | stat count 
result=20

i want to get results as 30 by adding these two files

0 Karma
1 Solution

493669
Super Champion

Like this-

|inputlookup ABC|stats count|append[|inputlookup XYZ|stats count]|stats sum(count) as count

View solution in original post

0 Karma

493669
Super Champion

Like this-

|inputlookup ABC|stats count|append[|inputlookup XYZ|stats count]|stats sum(count) as count
0 Karma

sideview
SplunkTrust
SplunkTrust

A minor comment for you - this works great but inputlookup actually has its own append=t argument that you can use. And in this case it's better to use it, than to rely on the append command because append hits failsafe at 50,000 rows where it would truncate.

So long story short you can just do:
| inputlookup ABC | inputlookup XYZ append=t | stats count

logloganathan
Motivator

wow its working...wonderful answer

0 Karma

logloganathan
Motivator

Please move to answer

0 Karma

grantsmiley
Path Finder

This work

(search1) OR (search2) |inputlookup ABC |inputlookup XYZ |stats count

0 Karma

logloganathan
Motivator

thanks for your response but it not working

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.


Introducing Unified TDIR with the New Enterprise Security 8.2

Read the blog
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...