summaryrefslogtreecommitdiffstats
path: root/node.d/snmp.node.js
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-02-08 01:22:58 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-02-08 01:22:58 +0200
commit7c0ba6a675cbca3a6fa1a0b79a37259ad4b52aee (patch)
tree8c29ac1d6ef26cffab549f2da21cde1ca12b41f2 /node.d/snmp.node.js
parent20051bfef74b701d5e67af84eca8b416bc5f5e2a (diff)
added a new element on all charts: context, which is the template upon the chart is build, changed the meaning of element: family, which now reflects the submenu of the dashboard; changed the priorities of most charts to allow the dashboard have dynamic sorting; added submenus to most categories of the main menu; now the dashboard is completely dynamic (except the top key charts)
Diffstat (limited to 'node.d/snmp.node.js')
-rwxr-xr-xnode.d/snmp.node.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/node.d/snmp.node.js b/node.d/snmp.node.js
index e7ba4b7522..76e9e5a664 100755
--- a/node.d/snmp.node.js
+++ b/node.d/snmp.node.js
@@ -185,6 +185,11 @@ netdata.processors.snmp = {
if(error) {
service.error('Received error = ' + netdata.stringify(error) + ' varbinds = ' + netdata.stringify(varbinds));
+
+ // make all values null
+ var len = service.snmp_oids.length;
+ while(len--)
+ service.snmp_oids_index[service.snmp_oids[len]].value = null;
}
else {
if(netdata.options.DEBUG === true)
@@ -221,6 +226,7 @@ var snmp = {
name: __filename,
enable_autodetect: true,
update_every: 1,
+ base_priority: 50000,
charts: {},
@@ -277,6 +283,8 @@ var snmp = {
var to = service.request.charts[c].multiply_range[1];
var prio = service.request.charts[c].priority || 1;
+ if(prio < snmp.base_priority) prio += snmp.base_priority;
+
while(from <= to) {
var id = c + from.toString();
var chart = extend(true, {}, service.request.charts[c]);