diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:15:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 08:15:20 +0000 |
commit | 87d772a7d708fec12f48cd8adc0dedff6e1025da (patch) | |
tree | 1fee344c64cc3f43074a01981e21126c8482a522 /src/go/collectors/go.d.plugin/modules/snmp/metadata.yaml | |
parent | Adding upstream version 1.46.3. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/go/plugin/go.d/modules/snmp/metadata.yaml (renamed from src/go/collectors/go.d.plugin/modules/snmp/metadata.yaml) | 216 |
1 files changed, 157 insertions, 59 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/snmp/metadata.yaml b/src/go/plugin/go.d/modules/snmp/metadata.yaml index a35b3190d..0475a2f21 100644 --- a/src/go/collectors/go.d.plugin/modules/snmp/metadata.yaml +++ b/src/go/plugin/go.d/modules/snmp/metadata.yaml @@ -21,22 +21,22 @@ modules: overview: data_collection: metrics_description: | - This collector monitors any SNMP devices and uses the [gosnmp](https://github.com/gosnmp/gosnmp) package. - - It supports: + This SNMP collector discovers and gathers statistics for network interfaces on SNMP-enabled devices: + + - Traffic + - Packets (unicast, multicast, broadcast) + - Errors + - Discards + - Administrative and operational status - - all SNMP versions: SNMPv1, SNMPv2c and SNMPv3. - - any number of SNMP devices. - - each SNMP device can be used to collect data for any number of charts. - - each chart may have any number of dimensions. - - each SNMP device may have a different update frequency. - - each SNMP device will accept one or more batches to report values (you can set `max_request_size` per SNMP server, to control the size of batches). + Additionally, it collects overall device uptime. - Keep in mind that many SNMP switches and routers are very slow. They may not be able to report values per second. - `go.d.plugin` reports the time it took for the SNMP device to respond when executed in the debug mode. + It is compatible with all SNMP versions (v1, v2c, and v3) and uses the [gosnmp](https://github.com/gosnmp/gosnmp) package. - Also, if many SNMP clients are used on the same SNMP device at the same time, values may be skipped. - This is a problem of the SNMP device, not this collector. In this case, consider reducing the frequency of data collection (increasing `update_every`). + **For advanced users**: + + - You can manually specify custom OIDs (Object Identifiers) to retrieve specific data points beyond the default metrics. + - However, defining custom charts with dimensions for these OIDs requires manual configuration. method_description: "" supported_platforms: include: [] @@ -50,23 +50,13 @@ modules: limits: description: "" performance_impact: - description: "" + description: | + **Device limitations**: Many SNMP switches and routers have limited processing power. They might not be able to report data as frequently as desired. You can monitor response times using go.d.plugin in debug mode to identify potential bottlenecks. + + **Concurrent access**: If multiple collectors or tools access the same SNMP device simultaneously, data points might be skipped. This is a limitation of the device itself, not this collector. To mitigate this, consider increasing the collection interval (update_every) to reduce the frequency of requests. setup: prerequisites: - list: - - title: Find OIDs - description: | - Use `snmpwalk`, like this: - - ```sh - snmpwalk -t 20 -O fn -v 2c -c public 192.0.2.1 - ``` - - - `-t 20` is the timeout in seconds. - - `-O fn` will display full OIDs in numeric format. - - `-v 2c` is the SNMP version. - - `-c public` is the SNMP community. - - `192.0.2.1` is the SNMP device. + list: [] configuration: file: name: go.d/snmp.conf @@ -79,7 +69,7 @@ modules: list: - name: update_every description: Data collection frequency. - default_value: 1 + default_value: 10 required: false - name: autodetection_retry description: Recheck interval in seconds. Zero means no recheck will be scheduled. @@ -87,7 +77,7 @@ modules: required: false - name: hostname description: Target ipv4 address. - default_value: 127.0.0.1 + default_value: "" required: true - name: community description: SNMPv1/2 community string. @@ -107,12 +97,24 @@ modules: required: false - name: options.timeout description: SNMP request/response timeout. - default_value: 10 + default_value: 5 + required: false + - name: options.max_repetitions + description: Controls how many SNMP variables to retrieve in a single GETBULK request. + default_value: 25 required: false - name: options.max_request_size - description: Maximum number of OIDs allowed in one one SNMP request. + description: Maximum number of OIDs allowed in a single GET request. default_value: 60 required: false + - name: network_interface_filter.by_name + description: "Filter interfaces by their names using [simple patterns](/src/libnetdata/simple_pattern/README.md#simple-patterns)." + default_value: "" + required: false + - name: network_interface_filter.by_type + description: "Filter interfaces by their types using [simple patterns](/src/libnetdata/simple_pattern/README.md#simple-patterns)." + default_value: "" + required: false - name: user.name description: SNMPv3 user name. default_value: "" @@ -242,10 +244,42 @@ modules: - the SNMP version is `2`. - the SNMP community is `public`. - we will update the values every 10 seconds. - - we define 2 charts `bandwidth_port1` and `bandwidth_port2`, each having 2 dimensions: `in` and `out`. + config: | + jobs: + - name: switch + update_every: 10 + hostname: 192.0.2.1 + community: public + options: + version: 2 + - name: SNMPv3 + description: | + To use SNMPv3: - > **SNMPv1**: just set `options.version` to 1. - > **Note**: the algorithm chosen is `incremental`, because the collected values show the total number of bytes transferred, which we need to transform into kbps. To chart gauges (e.g. temperature), use `absolute` instead. + - use `user` instead of `community`. + - set `options.version` to 3. + config: | + jobs: + - name: switch + update_every: 10 + hostname: 192.0.2.1 + options: + version: 3 + user: + name: username + level: authPriv + auth_proto: sha256 + auth_key: auth_protocol_passphrase + priv_proto: aes256 + priv_key: priv_protocol_passphrase + - name: Custom OIDs + description: | + In this example: + + - the SNMP device is `192.0.2.1`. + - the SNMP version is `2`. + - the SNMP community is `public`. + - we will update the values every 10 seconds. config: | jobs: - name: switch @@ -285,29 +319,7 @@ modules: oid: "1.3.6.1.2.1.2.2.1.16.2" multiplier: -8 divisor: 1000 - - name: SNMPv3 - description: | - To use SNMPv3: - - - use `user` instead of `community`. - - set `options.version` to 3. - - The rest of the configuration is the same as in the SNMPv1/2 example. - config: | - jobs: - - name: switch - update_every: 10 - hostname: 192.0.2.1 - options: - version: 3 - user: - name: username - level: authPriv - auth_proto: sha256 - auth_key: auth_protocol_passphrase - priv_proto: aes256 - priv_key: priv_protocol_passphrase - - name: Multiply range + - name: Custom OIDs with multiply range description: | If you need to define many charts using incremental OIDs, you can use the `charts.multiply_range` option. @@ -395,4 +407,90 @@ modules: enabled: false description: The metrics that will be collected are defined in the configuration file. availability: [] - scopes: [] + scopes: + - name: snmp device + description: These metrics refer to the SNMP device. + labels: + - name: sysName + description: "SNMP device's system name (OID: [1.3.6.1.2.1.1.5](https://oidref.com/1.3.6.1.2.1.1.5))." + metrics: + - name: snmp.device_uptime + description: SNMP device uptime + unit: seconds + chart_type: line + dimensions: + - name: uptime + - name: network interface + description: Network interfaces of the SNMP device being monitored. These metrics refer to each interface. + labels: + - name: sysName + description: "SNMP device's system name (OID: [1.3.6.1.2.1.1.5](https://oidref.com/1.3.6.1.2.1.1.5))." + - name: ifDescr + description: "Network interface description (OID: [1.3.6.1.2.1.2.2.1.2](https://cric.grenoble.cnrs.fr/Administrateurs/Outils/MIBS/?oid=1.3.6.1.2.1.2.2.1.2))." + - name: ifName + description: "Network interface name (OID: [1.3.6.1.2.1.2.2.1.2](https://cric.grenoble.cnrs.fr/Administrateurs/Outils/MIBS/?oid=1.3.6.1.2.1.31.1.1.1.1))." + - name: ifType + description: "Network interface type (OID: [1.3.6.1.2.1.2.2.1.2](https://cric.grenoble.cnrs.fr/Administrateurs/Outils/MIBS/?oid=1.3.6.1.2.1.2.2.1.3))." + metrics: + - name: snmp.device_net_interface_traffic + description: SNMP device network interface traffic + unit: kilobits/s + chart_type: area + dimensions: + - name: received + - name: sent + - name: snmp.device_net_interface_unicast + description: SNMP device network interface unicast packets + unit: packets/s + chart_type: line + dimensions: + - name: received + - name: sent + - name: snmp.device_net_interface_multicast + description: SNMP device network interface multicast packets + unit: packets/s + chart_type: line + dimensions: + - name: received + - name: sent + - name: snmp.device_net_interface_broadcast + description: SNMP device network interface broadcast packets + unit: packets/s + chart_type: line + dimensions: + - name: received + - name: sent + - name: snmp.device_net_interface_errors + description: SNMP device network interface errors + unit: errors/s + chart_type: line + dimensions: + - name: inbound + - name: outbound + - name: snmp.device_net_interface_discards + description: SNMP device network interface discards + unit: discards/s + chart_type: line + dimensions: + - name: inbound + - name: outbound + - name: snmp.device_net_interface_admin_status + description: SNMP device network interface administrative status + unit: status + chart_type: line + dimensions: + - name: up + - name: down + - name: testing + - name: snmp.device_net_interface_oper_status + description: SNMP device network interface operational status + unit: status + chart_type: line + dimensions: + - name: up + - name: down + - name: testing + - name: unknown + - name: dormant + - name: not_present + - name: lower_layer_down |