<p>I have written below query to fetch the pod count for a particular application as below:</p>
<p>index=&quot;stream_data&quot; sourcetype=&quot;kube:container:stream_app&quot; | search pod=&quot;data-app-streams-*&quot; | stats dc(pod) as pod_count</p>
<p>I have set the duration for this alert as 15 min.
However, the pod count shown by this query comes to 2 because it gives the logs for the busy pods only. But the actually running pods are 4.
Here pod is the already available field.</p>
<p>Can anyone suggest another approach for finding the actual pod count</p>

knowledge20
<p>Splunk can only work with the data it has.  If there are 4 pods, but only 2 of them have sent an event recently then Splunk will think there are only 2 pods.  One answer is search back further than 15 minutes.  Even then you run the risk of not all pods reporting an event during the time searched.  There's not much one can do about that.</p>
