For example "0.156166998446" is rounded to 0 and 10.5 is rounded to 10.
import potsdb
def opentsdb_upload_offset(device, sensor, offset_correction):
metrics = potsdb.Client('
example.com', port=4242, qsize=1000, host_tag=True, mps=100, check_host=True)
print 'offset correction is'
print offset_correction
metrics.send('offset_correction', offset_correction, sensor_id = sensor, sender_id = device)
metrics.wait()
print("Successfully loaded offset correction for %s, offset correction is %s " % (sensor, offset_correction))
if __name__ == "__main__":
device = 'test_device'
sensor = 'test_sensor'
offset_correction = 0.156166998446
opentsdb_upload_offset(device, sensor, offset_correction)