# How to calculate max qps with a nginx log index by a kibana visualization?

**URL:** <https://discuss.elastic.co/t/how-to-calculate-max-qps-with-a-nginx-log-index-by-a-kibana-visualization/321980>\
**Category:** Kibana\
**Created:** [December 26, 2022, 10:21am UTC](https://discuss.elastic.co/t/how-to-calculate-max-qps-with-a-nginx-log-index-by-a-kibana-visualization/321980 "2022-12-26T10:21:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KeithTt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keithtt/32/29447_2.png) [@KeithTt](https://discuss.elastic.co/u/KeithTt)\
**Post date:** [December 26, 2022, 10:21am UTC](https://discuss.elastic.co/t/how-to-calculate-max-qps-with-a-nginx-log-index-by-a-kibana-visualization/321980/1 "2022-12-26T10:21:06Z")

</div>

I create a line type visualization like below, and I don't know how to aggregate the buckets and get the max value.

 ![图片](https://us1.discourse-cdn.com/elastic/original/3X/3/e/3e2428c613f32895f1b14d944e55385b69de6f93.jpeg)

Here is the request body:

```json
{
  "size": 0,
  "_source": {
    "excludes": []
  },
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "time_iso8601",
        "interval": "1s",
        "time_zone": "Asia/Shanghai",
        "min_doc_count": 1
      },
      "aggs": {
        "3": {
          "terms": {
            "field": "host.keyword",
            "size": 10,
            "order": {
              "_count": "desc"
            }
          }
        }
      }
    }
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    "@timestamp",
    "time_iso8601"
  ],
  "query": {
    "bool": {
      "must": [
        {
          "match_all": {}
        },
        {
          "range": {
            "time_iso8601": {
              "gte": 1671897600000,
              "lte": 1671983999999,
              "format": "epoch_millis"
            }
          }
        }
      ],
      "filter": [],
      "should": [],
      "must_not": []
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [December 26, 2022, 2:08pm UTC](https://discuss.elastic.co/t/how-to-calculate-max-qps-with-a-nginx-log-index-by-a-kibana-visualization/321980/2 "2022-12-26T14:08:16Z")

</div>

You will need to provide more detail here. You need what `max` value? Can you give an example based on that screenshot?

---

<div class="post-metadata">

**Author:** ![KeithTt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keithtt/32/29447_2.png) [@KeithTt](https://discuss.elastic.co/u/KeithTt)\
**Post date:** [December 27, 2022, 1:51am UTC](https://discuss.elastic.co/t/how-to-calculate-max-qps-with-a-nginx-log-index-by-a-kibana-visualization/321980/3 "2022-12-27T01:51:44Z")

</div>

The max or peak value of every line...

I don't know if line type is suitable here, maybe I should use another type.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 24, 2023, 1:52am UTC](https://discuss.elastic.co/t/how-to-calculate-max-qps-with-a-nginx-log-index-by-a-kibana-visualization/321980/4 "2023-01-24T01:52:06Z")

</div>

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