[Opensearch-datasource] - How monitoring if logs is being inserted

Hello,

I’m using the Grafana-OpenSearch plugin to monitor whether logs for a particular service are rotating.

The idea is to perform a count on the pod log and if this log has not entered anything in the last 60 min it will generate an alarm in our monitoring chat.

In the configuration below, when the log of a particular pod doesn’t exist, the return is NoData and I would expect a counter equal to 0 to trigger a alarm using threshold rule.

The return:

image

I saw in the documentation that the MinDocCount parameter could be the solution to my case, but when I change its value from 1 to 0, the query filter by pod_name doesn’t work and ends up returning all the logs that exist in OpenSearch.

How can I make the return give me a counter equal to 0 when it doesn’t find a log for the pod in the defined rangetime?