Skip to content

Commit d532e32

Browse files
committed
Merge pull request #17 from tima/v09-final-json-api
V09 final json api
2 parents 7ec6aa3 + b7c4499 commit d532e32

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/influxdb.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ InfluxdbBackend.prototype.assembleEvent_v09 = function (name, events) {
395395
var self = this;
396396

397397
var payload = {
398-
name: name,
399-
timestamp: events[0]['time'],
398+
measurement: name,
400399
fields: { value: events[0]['value'] }
401400
}
402401

@@ -492,7 +491,7 @@ InfluxdbBackend.prototype.httpPOST_v09 = function (points) {
492491

493492
self.influxdbStats.httpResponseTime = millisecondsSince(startTime);
494493

495-
if (status !== 200) {
494+
if (status >= 400) {
496495
self.log(protocolName + ' Error: ' + status);
497496
}
498497
});
@@ -503,7 +502,6 @@ InfluxdbBackend.prototype.httpPOST_v09 = function (points) {
503502

504503
var payload = JSON.stringify({
505504
database: self.database,
506-
time_precision: 'ms',
507505
points: points
508506
});
509507

0 commit comments

Comments
 (0)