Package: graphite-api
Version: 1.1.3-2+deb9u1

With a target of:

movingAverage(alias(snmp.escalabra.snmp.if_octets-Slot__0_Port__2_Gigabit_-_Level.rx, 'g2 rx'), '5min')

...I get an exception from graphite. It's the same one shown here: https://github.com/brutasse/graphite-api/issues/201

The cause seems to be that graphite-api has not been completely ported to Python 3.

A patch that fixes this particular issue is attached. I don't know if there are other lurking dependencies on Python 2.

ttfn/rjk
--- /usr/lib/python3/dist-packages/graphite_api/functions.py.orig	2020-04-08 18:38:00.827220689 +0100
+++ /usr/lib/python3/dist-packages/graphite_api/functions.py	2020-04-08 18:38:04.915021572 +0100
@@ -2106,7 +2106,7 @@
     for bootstrap, original in zip_longest(bootstrapList, seriesList):
         newValues = []
         if bootstrap.step != original.step:
-            ratio = bootstrap.step / original.step
+            ratio = bootstrap.step // original.step
             for value in bootstrap:
                 # XXX For series with aggregationMethod = sum this should also
                 # divide by the ratio to bring counts to the same time unit

Reply via email to