Short description: When a consumer orders groceries online, I provide the picker—the individual who picked the foods based on the order—with an estimated box that will be needed for that order and that data is stored in a database. The functionality of the Estimated box generally works, although occasionally it fluctuates. It may be greater or lesser. Actual box use data will be stored in data if the picker adds more or fewer boxes than necessary for the order. Actual data box never store in database if approximated functionality works. Expected output: 1. I want find out how much Percentage/Average of actual values missing. I am not sure how to evaluate null/defined Actual boxes. This is my attempt not sure is it correct:
| spath path=data{}.actual_totes{}.finalBoxAmount output=finalBoxes
| spath path=data{}.estimated_totes{}.box output=estimatedBox
| stats sum(estimatedBox) as totalEstimatedBox, sum(finalBoxes) as totalFinalBoxes
| eval diff =( totalFinalBoxes - totalEstimatedBox) * 100 / totalFinalBoxes
| table diff
This is my data splunk data table image. As you can see in splunk table some my actual boxes value is null/undefined/emptyObject(not sure). In splunk JSON, this is how I get actual_totes: { }
data: {
actual_totes: { },
estimated_totes: {
box: 4
}
}
PS: I'm a rookie with Splunk, thus my grasp of its syntax is limited. Please walk me through how to display the value in a PIE chart. Pie chat had the following value: Estimated Boxes, Real Boxes used, and missing actual numbers in Percentage %. Thank you.
... View more