diff options
author | Lennart Weller <lhw@ring0.de> | 2016-04-21 12:27:29 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2016-04-21 12:27:29 +0000 |
commit | 30b94862648cdbf4f537337d2e2f01c369a9dee9 (patch) | |
tree | f0219dd8bd744fc09899bd0266402e05a4bff854 /node.d/node_modules/netdata.js | |
parent | Imported Upstream version 1.0.0 (diff) | |
download | netdata-30b94862648cdbf4f537337d2e2f01c369a9dee9.tar.xz netdata-30b94862648cdbf4f537337d2e2f01c369a9dee9.zip |
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'node.d/node_modules/netdata.js')
-rw-r--r--[-rwxr-xr-x] | node.d/node_modules/netdata.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/node.d/node_modules/netdata.js b/node.d/node_modules/netdata.js index 9834534ee..f36a97b69 100755..100644 --- a/node.d/node_modules/netdata.js +++ b/node.d/node_modules/netdata.js @@ -3,6 +3,7 @@ var url = require('url'); var http = require('http'); var util = require('util'); +var Int64 = require('node-int64'); /* var netdata = require('netdata'); @@ -339,8 +340,14 @@ var netdata = { if(typeof value === 'undefined' || value === null) return false; - if(this._current_chart._dimensions_count !== 0) - this.queue('SET ' + dimension + ' = ' + value); + if(this._current_chart._dimensions_count !== 0) { + if (value instanceof Buffer) { + var value64 = new Int64(value); + this.queue('SET ' + dimension + ' = ' + value64.toString(10)); + } + else + this.queue('SET ' + dimension + ' = ' + value.toString()); + } return true; }; |