summaryrefslogtreecommitdiffstats
path: root/collectors/node.d.plugin/snmp
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/node.d.plugin/snmp')
-rw-r--r--collectors/node.d.plugin/snmp/README.md26
-rw-r--r--collectors/node.d.plugin/snmp/snmp.node.js4
2 files changed, 20 insertions, 10 deletions
diff --git a/collectors/node.d.plugin/snmp/README.md b/collectors/node.d.plugin/snmp/README.md
index a307a3642..832108b94 100644
--- a/collectors/node.d.plugin/snmp/README.md
+++ b/collectors/node.d.plugin/snmp/README.md
@@ -92,16 +92,14 @@ In this example:
`family` sets the name of the submenu of the dashboard each chart will appear under.
-If you need to define many charts using incremental OIDs, you can use something like this:
-
-This is like the previous, but the option `multiply_range` given, will multiply the current chart from `1` to `24` inclusive, producing 24 charts in total for the 24 ports of the switch `10.11.12.8`.
+`multiplier` and `divisor` are passed by the plugin to the Netdata daemon and are applied to the metric to convert it properly to `units`. For incremental counters with the exception of Counter64 type metrics, `offset` is added to the metric from within the SNMP plugin. This means that the value you will see in debug mode in the `DEBUG: setting current chart to... SET` line for a metric will not have been multiplied or divided, but it will have had the offset added to it.
-Each of the 24 new charts will have its id (1-24) appended at:
+<details markdown="1"><summary><b>Caution: Counter64 metrics do not support `offset` (issue #5028).</b></summary>
+The SNMP plugin supports Counter64 metrics with the only limitation that the `offset` parameter should not be defined. Due to the way Javascript handles large numbers and the fact that the offset is applied to metrics inside the plugin, the offset will be ignored silently.
+</details>
+<br>
+If you need to define many charts using incremental OIDs, you can use something like this:
-1. its chart unique id, i.e. `snmp_switch.bandwidth_port1` to `snmp_switch.bandwidth_port24`
-2. its `title`, i.e. `Switch Bandwidth for port 1` to `Switch Bandwidth for port 24`
-3. its `oid` (for all dimensions), i.e. dimension `in` will be `1.3.6.1.2.1.2.2.1.10.1` to `1.3.6.1.2.1.2.2.1.10.24`
-3. its priority (which will be incremented for each chart so that the charts will appear on the dashboard in this order)
```json
{
@@ -144,6 +142,16 @@ Each of the 24 new charts will have its id (1-24) appended at:
}
```
+This is like the previous, but the option `multiply_range` given, will multiply the current chart from `1` to `24` inclusive, producing 24 charts in total for the 24 ports of the switch `10.11.12.8`.
+
+Each of the 24 new charts will have its id (1-24) appended at:
+
+1. its chart unique id, i.e. `snmp_switch.bandwidth_port1` to `snmp_switch.bandwidth_port24`
+2. its `title`, i.e. `Switch Bandwidth for port 1` to `Switch Bandwidth for port 24`
+3. its `oid` (for all dimensions), i.e. dimension `in` will be `1.3.6.1.2.1.2.2.1.10.1` to `1.3.6.1.2.1.2.2.1.10.24`
+3. its priority (which will be incremented for each chart so that the charts will appear on the dashboard in this order)
+
+
The `options` given for each server, are:
- `timeout`, the time to wait for the SNMP device to respond. The default is 5000 ms.
@@ -355,3 +363,5 @@ This switch has a very slow SNMP processors. To respond, it needs about 8 second
]
}
```
+
+[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fnode.d.plugin%2Fsnmp%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()
diff --git a/collectors/node.d.plugin/snmp/snmp.node.js b/collectors/node.d.plugin/snmp/snmp.node.js
index a051d3d3a..6b33ae0d5 100644
--- a/collectors/node.d.plugin/snmp/snmp.node.js
+++ b/collectors/node.d.plugin/snmp/snmp.node.js
@@ -265,7 +265,7 @@ netdata.processors.snmp = {
if(__DEBUG === true)
netdata.debug(service.module.name + ': ' + service.name + ': failed ' + service.module.name + ' get for OIDs ' + varbinds[i].oid);
- service.error('OID ' + varbinds[i].oid + ' gave error: ' + snmp.varbindError(varbinds[i]));
+ service.error('OID ' + varbinds[i].oid + ' gave error: ' + net_snmp.varbindError(varbinds[i]));
value = null;
failed++;
}
@@ -394,7 +394,7 @@ var snmp = {
var d = dim_keys[j];
if (dimensions[d].value !== null) {
- if(typeof dimensions[d].offset === 'number')
+ if(typeof dimensions[d].offset === 'number' && typeof dimensions[d].value === 'number')
service.set(d, dimensions[d].value + dimensions[d].offset);
else
service.set(d, dimensions[d].value);