/api/v1/metrics
- Post
To get the set of metrics from the database using the filters provided in the request body:
Command
curl -i -d '{ "beginDate":"2020-08-10T00:30:48.489Z", "endDate":"2020-08-10T00:33:48.489Z", "metric":"queue.save" }' -H "Content-Type: application/json" -X POST http://localhost:3000/api/v1/metrics
Example
pi@pibot:~ $ curl -i -d '{ "beginDate":"2020-08-10T00:30:48.489Z", "endDate":"2020-08-10T00:33:48.489Z", "metric":"queue.save" }' -H "Content-Type: application/json" -X POST http://localhost:3000/api/v1/metrics
HTTP/1.1 200 OK
Date: Thu, 13 Aug 2020 04:33:25 GMT
Content-Length: 1227
Content-Type: text/plain; charset=utf-8
[{"date":"2020-08-10T00:30:50.417Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-p57sh"},"value":56},{"date":"2020-08-10T00:31:01.134Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-lfsvx"},"value":58},{"date":"2020-08-10T00:31:47.949Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-dxthz"},"value":121},{"date":"2020-08-10T00:31:50.433Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-p57sh"},"value":5},{"date":"2020-08-10T00:32:01.153Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-lfsvx"},"value":56},{"date":"2020-08-10T00:32:47.959Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-dxthz"},"value":121},{"date":"2020-08-10T00:32:50.434Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-p57sh"},"value":121},{"date":"2020-08-10T00:33:01.196Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-lfsvx"},"value":1},{"date":"2020-08-10T00:33:47.961Z","metric":"queue.save","source":"ingestor","tags":{"podName":"ingestor-5ffc4f5584-dxthz"},"value":83}]