diff options
author | Volker Hoffmann <volker@cheleb.net> | 2015-08-28 09:13:43 +0200 |
---|---|---|
committer | Volker Hoffmann <volker@cheleb.net> | 2015-08-28 09:13:43 +0200 |
commit | 233bfe2d798ad66787eb6f73603daef37df7b68c (patch) | |
tree | 55c015c92fac0297701f63c81d29ec540dad6f65 | |
parent | 1359a393de6c5f1d65aea79db39d6a7316dafee3 (diff) |
fix: for >=influxdb-0.9.3, integer values require a trailing i
-rw-r--r-- | ticker.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -38,26 +38,28 @@ temperature, netatmo_epoch = sensors.get_netatmo_temperature() # ############################################################################# # Build Data Post +# NB: For InfluxDB >=0.9.3, integer data points require a trailing i. +# For example, ncpus_allocated,parititon=cpu value=5i # ############################################################################# epoch = int(time.time()) lines = [] # CPU Allocations for partition, ncpus_allocated in cpu_allocations.iteritems(): - line = "ncpus_allocated,partition=%s value=%i %i" % \ + line = "ncpus_allocated,partition=%s value=%ii %i" % \ (partition, ncpus_allocated, epoch) lines.append(line) # Number of Nodes Down for partition, nnodes_down in number_of_nodes_down.iteritems(): - line = "nodes,state=down,partition=%s value=%i %i" % \ + line = "nodes,state=down,partition=%s value=%ii %i" % \ (partition, nnodes_down, epoch) lines.append(line) # Jobs per Partition per State for partition, njobs_by_state in njobs_by_partition_and_state.iteritems(): for state, njobs in njobs_by_state.iteritems(): - line = "jobs,state=%s,partition=%s value=%i %i" % \ + line = "jobs,state=%s,partition=%s value=%ii %i" % \ (state, partition, njobs, epoch) lines.append(line) |