Skip to content
Snippets Groups Projects
Commit f02d45d2 authored by Simon Crowle's avatar Simon Crowle
Browse files

Fixes time-out on MINIO query and adds additional test

parent 327a66bb
No related branches found
No related tags found
No related merge requests found
......@@ -65,8 +65,10 @@ def test_ping(telegraf_agent_config):
('disk', 'SELECT mean("free") AS "mean" FROM "CLMCMetrics"."autogen"."disk"', 0),
('diskio', 'SELECT mean("write_bytes") AS "mean" FROM "CLMCMetrics"."autogen"."diskio"', 0),
('mem', 'SELECT mean("free") AS "mean" FROM "CLMCMetrics"."autogen"."mem"', 0),
# Report MINIO's HTTP request response time (as a rolling difference of the sum total)
('minio_http_requests_duration_seconds', 'SELECT difference(max("sum")) AS "mean" FROM "CLMCMetrics"."autogen"."minio_http_requests_duration_seconds" WHERE time > now() - 1h GROUP BY time(10s)',0),
# Report the average change in difference of MINIO's HTTP response time (the inner query determines a rolling difference between sampling periods [respTimeDiff])
('minio_http_requests_duration_seconds', 'select mean("respTimeDiff") as "mean" from (select difference(max("sum")) as "respTimeDiff" from "CLMCMetrics"."autogen"."minio_http_requests_duration_seconds" where time > 0 group by time(10s))',0)
('minio_http_requests_duration_seconds', 'SELECT mean("respTimeDiff") AS "mean" FROM (SELECT difference(max("sum")) AS "respTimeDiff" FROM "CLMCMetrics"."autogen"."minio_http_requests_duration_seconds" WHERE time > now() - 1h GROUP BY time(10s))',0)
])
def test_all_inputs(influxdb, measurement, query, expected_result):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment