ctucx.git: fritzbox-exporter

prometheus exporter for lte fritzboxes [used @ fbexporter.ctu.cx]

commit a8ee926070017fde0a0bc544f72ecee63de2edff
parent fc7cb10f4673107c050b6d342e55b8838fe3a424
Author: Isabelle K <hi@f2k1.de>
Date: Wed, 5 Aug 2020 23:13:25 +0200

fix divide
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fb_exporter.nim b/src/fb_exporter.nim
@@ -139,7 +139,7 @@ proc prometheusResponse* (request: Request, state: JsonNode) {.async.} =
 
               if data[cell].hasKey("usage"):
                 let cell_usage = data[cell]["usage"].getInt
-                res &= "fritzbox_network_usage{cell=\"" & $num & "\"} " & $(cell_usage/1000) & " " & $(lastUpdated * 1000) & "\n"
+                res &= "fritzbox_network_usage{cell=\"" & $num & "\"} " & $(cell_usage) & " " & $(lastUpdated * 1000) & "\n"
 
         data.parseCell(0) 
         data.parseCell(1)