Splunk Search

Stats count with lookups

kiran331
Builder

Hello,

I have to get the individual count of three lookups A,B,C. How can I show the count of each lookup n Dashboard in one panel?

search i'm trying:

|inputlookup A.csv |append [|inputlookup B.csv]|append [|inputlookup C.csv]|append [|D.csv] | stats count ???

Tags (2)
1 Solution

sideview
SplunkTrust
SplunkTrust

You should use the inputlookup command's append=t command instead of the append command. (long story)

Here is the approach I would try.

| inputlookup A | eval file="A" | inputlookup append=t B | fillnull file value="B" | inputlookup append=t C | fillnull file value="C" | stats count by file

(Obviously if a field called "file" is actually present in any of these three lookups this wont work very well, but if so just pick a suitable field name.)

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

You should use the inputlookup command's append=t command instead of the append command. (long story)

Here is the approach I would try.

| inputlookup A | eval file="A" | inputlookup append=t B | fillnull file value="B" | inputlookup append=t C | fillnull file value="C" | stats count by file

(Obviously if a field called "file" is actually present in any of these three lookups this wont work very well, but if so just pick a suitable field name.)

0 Karma
Get Updates on the Splunk Community!

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 ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...