How can we compare no of hits in query

I am using metricbeat for getting system uptime. When a system goes down , the no of hits is less than 1. Is there any way we can add that no_of_hits < 1 in a query.

Earlier i am using this query. But i did not get any result

 "query": {
    "bool": {
      "must": [
        {
          "term": {
            "metricset.name": "uptime"
          }
        },
        {
          "range": {
            "system.uptime.duration.ms": {
              "lt": 0
            }
          }
        }
      ]
    }
  }

I shutdown one system but i didn't get any result.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.