summaryrefslogtreecommitdiff
path: root/src/daq/flumotion-rrd
diff options
context:
space:
mode:
Diffstat (limited to 'src/daq/flumotion-rrd')
-rwxr-xr-xsrc/daq/flumotion-rrd/s5-flumotion-rrd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/daq/flumotion-rrd/s5-flumotion-rrd.py b/src/daq/flumotion-rrd/s5-flumotion-rrd.py
index 4b0a2d1..6809d20 100755
--- a/src/daq/flumotion-rrd/s5-flumotion-rrd.py
+++ b/src/daq/flumotion-rrd/s5-flumotion-rrd.py
@@ -135,7 +135,7 @@ class FlumotionRRD():
return False
print 'SFive: will use 7 days of data ending with %s using a step size of %d seconds' % (
- datetime.datetime.utcfromtimestamp(self._end).isoformat('T'), self._duration)
+ datetime.datetime.utcfromtimestamp(self._end).isoformat('T') + 'Z', self._duration)
except rrdtool.error as e:
print 'SFive: rrdtool-error: %s' % (e)
@@ -194,7 +194,9 @@ class FlumotionRRD():
return cnt
def _sendDataset(self, timestamp, duration, client_count, bytes_sent):
- data = { "start-time": timestamp.isoformat('T'),
+ client_count = int(round(client_count)) if client_count else 0
+ bytes_sent = int(round(bytes_sent)) if bytes_sent else 0
+ data = { "start-time": timestamp.isoformat('T') + 'Z',
"duration-ms": duration * 1000,
"data": {
"client-count": client_count,