Series Query: Counter Aggregator

Description

ChartLab

Request

URI

POST /api/v1/series/query

Payload

[
  {
    "startDate": "2018-12-18T10:30:00Z",
    "endDate":   "2018-12-18T12:00:00Z",
    "entity": "nurswgvml201",
    "metric": "log_event_total_counter",
    "tags": {"LEVEL": "ERROR"},
    "aggregate": {"period": {"count": 5, "unit": "MINUTE"},
                  "types": ["DELTA", "COUNTER"]}
  }
]

Response

Payload

[
  {
    "entity": "nurswgvml201",
    "metric": "log_event_total_counter",
    "tags": {
      "level": "ERROR"
    },
    "type": "HISTORY",
    "aggregate": {
      "type": "DELTA",
      "period": {
        "count": 5,
        "unit": "MINUTE",
        "align": "CALENDAR"
      },
      "counter": false
    },
    "data": [
      {
        "d": "2018-12-18T10:30:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:35:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:40:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:45:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:50:00.000Z",
        "v": 496
      },
      {
        "d": "2018-12-18T10:55:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:00:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:05:00.000Z",
        "v": 1
      },
      {
        "d": "2018-12-18T11:10:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:15:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:20:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:25:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:30:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:35:00.000Z",
        "v": 1
      },
      {
        "d": "2018-12-18T11:40:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:45:00.000Z",
        "v": -509
      },
      {
        "d": "2018-12-18T11:50:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:55:00.000Z",
        "v": 0
      }
    ]
  },
  {
    "entity": "nurswgvml201",
    "metric": "log_event_total_counter",
    "tags": {
      "level": "ERROR"
    },
    "type": "HISTORY",
    "aggregate": {
      "type": "COUNTER",
      "period": {
        "count": 5,
        "unit": "MINUTE",
        "align": "CALENDAR"
      }
    },
    "data": [
      {
        "d": "2018-12-18T10:30:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:35:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:40:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:45:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T10:50:00.000Z",
        "v": 496
      },
      {
        "d": "2018-12-18T10:55:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:00:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:05:00.000Z",
        "v": 1
      },
      {
        "d": "2018-12-18T11:10:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:15:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:20:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:25:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:30:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:35:00.000Z",
        "v": 1
      },
      {
        "d": "2018-12-18T11:40:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:45:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:50:00.000Z",
        "v": 0
      },
      {
        "d": "2018-12-18T11:55:00.000Z",
        "v": 0
      }
    ]
  }
]