All Downloads are FREE. Search and download functionalities are using the official Maven repository.

freemarker.healthcheck.avg-availability.ftl Maven / Gradle / Ivy

There is a newer version: 1.14.0
Show newest version
<#ftl output_format="JSON">
{
  "size" : 0,
  "query" : {
    "bool" : {
      "filter" : [
        {
          "term" : {
            "api": "${query.root().id()}"
          }
        }
      ]
    }
  },
  "aggregations" : {
    "terms" : {
      "terms" : {
        "field" : "${query.field()?lower_case}",
        "size" : 10,
        "order" : [
          {
            "_count" : "desc"
          },
          {
            "_term" : "asc"
          }
        ]
      },
      "aggregations" : {
        "ranges" : {
          "date_range" : {
            "field" : "@timestamp",
            "ranges" : [
              {
                "key" : "1m",
                "from" : "now-1m"
              },
              {
                "key" : "1h",
                "from" : "now-1h"
              },
              {
                "key" : "1d",
                "from" : "now-1d"
              },
              {
                "key" : "1w",
                "from" : "now-1w"
              },
              {
                "key" : "1M",
                "from" : "now-1M"
              }
            ],
            "keyed" : false
          },
          "aggregations" : {
            "results" : {
              "terms" : {
                "field" : "available",
                "size" : 10,
                "order" : [
                  {
                    "_count" : "desc"
                  },
                  {
                    "_term" : "asc"
                  }
                ]
              }
            }
          }
        }
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy