Splunk Search

How can I show count as zero if no downloads have been made, but still show other source data?

mistydennis
Communicator

I'm running a search that combines two data sources: one source captures our download logs and one source holds metadata about the document being downloaded. I'm using a join command to connect the two data sources. If a document has not been downloaded, I still want it to show in the results, but currently it is being filtered out entirely by my search. What needs to change in my search in order for the document to show (with "0" downloads)?

response_code=200 | filterbots| join DocumentFoo [inputlookup docs] |search DocumentFoo="name of document" | stats count fields I want to show, dc(src_ip) as distinctip by IPLocation | table fields I want to show |

0 Karma

sundareshr
Legend

Try like this

response_code=200 
| filterbots
| stats count fields I want to show, dc(src_ip) as distinctip by IPLocation 
| append [| inputlookup docs | eval count=0 ] 
| sort IPLocation DocumentFoo - count
| dedup IPLocation DocumentFoo 
| search DocumentFoo="name of document" 
| table fields I want to show
0 Karma

nravichandran
Communicator

use fillnull value=0

search | fillnull value=0 | stats

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...