]> arthur.barton.de Git - netdata.git/commitdiff
fixes #369, SNMP 64 bit counters; plugins.d now accept SET = 0xHEXVALUE; node-int64...
authorCosta Tsaousis <costa@tsaousis.gr>
Wed, 4 May 2016 18:19:01 +0000 (21:19 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Wed, 4 May 2016 18:19:01 +0000 (21:19 +0300)
LICENSE.md
node.d/Makefile.am
node.d/node_modules/netdata.js
src/plugins_d.c
web/index.html

index 3221f223105b9bf1772b40aeb0414b67edafe73a..380e86eeee5d39c907f28a3f836c911c6d4b51f8 100644 (file)
@@ -138,8 +138,4 @@ connectivity is not available.
     Copyright 2015, Joseph Huckaby
     [MIT License](https://github.com/jhuckaby/pixl-xml)
     
-- [node-int64](https://github.com/broofa/node-int64)
-
-    Copyright 2014, Robert Kieffer
-    [MIT License](https://github.com/broofa/node-int64/blob/master/LICENSE)
     
index b6892bb6c1245a3e59d5392f9e63053158bfb48d..c1caa4f0ef25ab5d32c003e3a17625fd6d07802d 100644 (file)
@@ -14,7 +14,6 @@ dist_nodemodules_DATA = \
        node_modules/pixl-xml.js \
        node_modules/net-snmp.js \
        node_modules/asn1.js \
-       node_modules/node-int64.js \
        $(NULL)
 
 nodemodulesberdir=$(nodedir)/node_modules/ber
index f36a97b695d80136d7f928ae4533a5f6a27d00f0..6183993b5ba03898cca4e5e982e8fccf2551e922 100644 (file)
@@ -3,7 +3,6 @@
 var url = require('url');
 var http = require('http');
 var util = require('util');
-var Int64 = require('node-int64');
 
 /*
 var netdata = require('netdata');
@@ -341,10 +340,8 @@ var netdata = {
                                return false;
 
                        if(this._current_chart._dimensions_count !== 0) {
-                               if (value instanceof Buffer) {
-                                       var value64 = new Int64(value);
-                                       this.queue('SET ' + dimension + ' = ' + value64.toString(10));
-                               }
+                               if (value instanceof Buffer)
+                                       this.queue('SET ' + dimension + ' = 0x' + value.toString('hex'));
                                else
                                        this.queue('SET ' + dimension + ' = ' + value.toString());
                        }
index b8524d99c77210404a6397e25aa6c1aacdbf9589..e4d2336d3b1e97f86c95337026a07b24aa80bf86 100644 (file)
@@ -181,7 +181,7 @@ void *pluginsd_worker_thread(void *arg)
 
                                if(unlikely(st->debug)) debug(D_PLUGINSD, "PLUGINSD: '%s' is setting dimension %s/%s to %s", cd->fullfilename, st->id, dimension, value?value:"<nothing>");
 
-                               if(value) rrddim_set(st, dimension, atoll(value));
+                               if(value) rrddim_set(st, dimension, strtoll(value, NULL, 0));
 
                                count++;
                        }
@@ -311,11 +311,11 @@ void *pluginsd_worker_thread(void *arg)
                                }
 
                                long multiplier = 1;
-                               if(multiplier_s && *multiplier_s) multiplier = atol(multiplier_s);
+                               if(multiplier_s && *multiplier_s) multiplier = strtol(multiplier_s, NULL, 0);
                                if(unlikely(!multiplier)) multiplier = 1;
 
                                long divisor = 1;
-                               if(likely(divisor_s && *divisor_s)) divisor = atol(divisor_s);
+                               if(likely(divisor_s && *divisor_s)) divisor = strtol(divisor_s, NULL, 0);
                                if(unlikely(!divisor)) divisor = 1;
 
                                if(unlikely(!algorithm || !*algorithm)) algorithm = "absolute";
@@ -351,7 +351,7 @@ void *pluginsd_worker_thread(void *arg)
 #ifdef DETACH_PLUGINS_FROM_NETDATA
                        else if(likely(hash == MYPID_HASH && !strcmp(s, "MYPID"))) {
                                char *pid_s = words[1];
-                               pid_t pid = atol(pid_s);
+                               pid_t pid = strtod(pid_s, NULL, 0);
 
                                if(likely(pid)) cd->pid = pid;
                                debug(D_PLUGINSD, "PLUGINSD: %s is on pid %d", cd->id, cd->pid);
index 06695647f3b96618d9a444f8a6c02aadf77b05d4..90db3eeb54fbac61e6ed277ac65919a55ff7dbb9 100644 (file)
                                                <i class="fa fa-circle"></i> <a href="http://D3js.org/" target="_blank">D3</a>,
                                                <i class="fa fa-copyright"></i> Copyright 2015, Mike Bostock, <a href="http://opensource.org/licenses/BSD-3-Clause" target="_blank">BSD License</a>
 
-                                               <i class="fa fa-circle"></i> <a href="https://github.com/broofa/node-int64" target="_blank">node-int64</a>,
-                                               <i class="fa fa-copyright"></i> Copyright 2014, Robert Kieffer, <a href="https://github.com/broofa/node-int64/blob/master/LICENSE" target="_blank">MIT License</a>
-
                                        </small>
                                </div>
                        </div>