Splunk Search

How to get the sum of total number of failed items count after excluding Item Not Recognized and Loading for both fields?

monipinni
Explorer

I have two fields body.response.failedItemsCount , body.failedItemsCount , In this I have to filter with two unwanted fields :

"body.response.failedItemsHistory{}.itemName"!="Item Not Recognized" AND "body.response.failedItemsHistory{}.itemName"!="Loading..."

""body.failedItemsHistory{}.itemName"!="Item Not Recognized" AND "body.failedItemsHistory{}.itemName"!="Loading..."

I tried base search:

| spath "body.response.failedItemsHistory{}.itemName" | search "body.response.failedItemsHistory{}.itemName"!="Item Not Recognized" AND "body.response.failedItemsHistory{}.itemName"!="Loading..." OR  "body.failedItemsHistory{}.itemName"!="Item Not Recognized" AND "body.failedItemsHistory{}.itemName"!="Loading..." | stats sum(body.response.failedItemsCount) as sum1 , sum("body.failedItemsCount") as sum2 | eval totalsum = sum1 + sum2

How can I get sum of total sum of failed items count after excluding Item Not Recognized and Loading for both fields?

0 Karma
1 Solution

vnravikumar
Champion

Hi @monipinni

Try with

yourquery...| search "body.response.failedItemsHistory.itemName"!="Item Not Recognized" AND "body.response.failedItemsHistory.itemName"!="Loading..." OR "body.failedItemsHistory.itemName"!="Item Not Recognized" AND "body.failedItemsHistory.itemName"!="Loading..." 

View solution in original post

0 Karma

vnravikumar
Champion

Hi @monipinni

Try with

yourquery...| search "body.response.failedItemsHistory.itemName"!="Item Not Recognized" AND "body.response.failedItemsHistory.itemName"!="Loading..." OR "body.failedItemsHistory.itemName"!="Item Not Recognized" AND "body.failedItemsHistory.itemName"!="Loading..." 
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...