From 77c864b4d7e1ef4075ed115b036791c75176bef7 Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 6 Mar 2021 02:48:57 +0100 Subject: [PATCH] matemat: truncate statistics for existing influxdb schema --- matemat/scrape.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matemat/scrape.rb b/matemat/scrape.rb index dd86bdb..319be17 100644 --- a/matemat/scrape.rb +++ b/matemat/scrape.rb @@ -13,7 +13,7 @@ points = [] data = JSON.parse open("https://#{HOST}/statistics.json", :http_basic_authentication => [USER, PASSWORD]).read() points.push({ series: 'statistics', - values: data, + values: data.map { |(n, i)| [n, i.to_i] }, }) data = JSON.parse open("http://#{HOST}/summary.json", :http_basic_authentication => [USER, PASSWORD]).read()