docs(go.d/snmp): remove legacy "custom oid" cfg examples (#20972)
Ilya Mashchenko committed
Sep 14, 2025 at 09:29 UTC
c2560997cf3bc55534a80e207447cb8b3d0299b5
1 file changed
-186
src/go/plugin/go.d/collector/snmp/metadata.yaml
-186
@@ -32,11 +32,6 @@ modules:
32
Additionally, it collects overall device uptime.
33
34
It is compatible with all SNMP versions (v1, v2c, and v3) and uses the [gosnmp](https://github.com/gosnmp/gosnmp) package.
35
-
36
- **For advanced users**:
37
-
38
- - You can manually specify custom OIDs (Object Identifiers) to retrieve specific data points beyond the default metrics.
39
- - However, defining custom charts with dimensions for these OIDs requires manual configuration.
35
method_description: ""
36
supported_platforms:
37
include: []
@@ -221,62 +216,6 @@ modules:
216
description: Privacy protocol pass phrase.
217
default_value: ""
218
required: false
224
- - name: charts
225
- description: List of charts.
226
- default_value: "[]"
227
- required: true
228
- - name: charts.id
229
- description: Chart ID. Used to uniquely identify the chart.
230
- default_value: ""
231
- required: true
232
- - name: charts.title
233
- description: Chart title.
234
- default_value: "Untitled chart"
235
- required: false
236
- - name: charts.units
237
- description: Chart units.
238
- default_value: num
239
- required: false
240
- - name: charts.family
241
- description: Chart family.
242
- default_value: charts.id
243
- required: false
244
- - name: charts.type
245
- description: Chart type (line, area, stacked).
246
- default_value: line
247
- required: false
248
- - name: charts.priority
249
- description: Chart priority.
250
- default_value: 70000
251
- required: false
252
- - name: charts.multiply_range
253
- description: Used when you need to define many charts using incremental OIDs.
254
- default_value: "[]"
255
- required: false
256
- - name: charts.dimensions
257
- description: List of chart dimensions.
258
- default_value: "[]"
259
- required: true
260
- - name: charts.dimensions.oid
261
- description: Collected metric OID.
262
- default_value: ""
263
- required: true
264
- - name: charts.dimensions.name
265
- description: Dimension name.
266
- default_value: ""
267
- required: true
268
- - name: charts.dimensions.algorithm
269
- description: Dimension algorithm (absolute, incremental).
270
- default_value: absolute
271
- required: false
272
- - name: charts.dimensions.multiplier
273
- description: Collected value multiplier, applied to convert it properly to units.
274
- default_value: 1
275
- required: false
276
- - name: charts.dimensions.divisor
277
- description: Collected value divisor, applied to convert it properly to units.
278
- default_value: 1
279
- required: false
219
examples:
220
folding:
221
title: Config
@@ -318,131 +257,6 @@ modules:
257
auth_key: auth_protocol_passphrase
258
priv_proto: aes256
259
priv_key: priv_protocol_passphrase
321
- - name: Custom OIDs
322
- description: |
323
- In this example:
324
-
325
- - the SNMP device is `192.0.2.1`.
326
- - the SNMP version is `2`.
327
- - the SNMP community is `public`.
328
- - we will update the values every 10 seconds.
329
- config: |
330
- jobs:
331
- - name: switch
332
- update_every: 10
333
- hostname: 192.0.2.1
334
- community: public
335
- options:
336
- version: 2
337
- charts:
338
- - id: "bandwidth_port1"
339
- title: "Switch Bandwidth for port 1"
340
- units: "kilobits/s"
341
- type: "area"
342
- family: "ports"
343
- dimensions:
344
- - name: "in"
345
- oid: "1.3.6.1.2.1.2.2.1.10.1"
346
- algorithm: "incremental"
347
- multiplier: 8
348
- divisor: 1000
349
- - name: "out"
350
- oid: "1.3.6.1.2.1.2.2.1.16.1"
351
- multiplier: -8
352
- divisor: 1000
353
- - id: "bandwidth_port2"
354
- title: "Switch Bandwidth for port 2"
355
- units: "kilobits/s"
356
- type: "area"
357
- family: "ports"
358
- dimensions:
359
- - name: "in"
360
- oid: "1.3.6.1.2.1.2.2.1.10.2"
361
- algorithm: "incremental"
362
- multiplier: 8
363
- divisor: 1000
364
- - name: "out"
365
- oid: "1.3.6.1.2.1.2.2.1.16.2"
366
- multiplier: -8
367
- divisor: 1000
368
- - name: Custom OIDs with multiply range
369
- description: |
370
- If you need to define many charts using incremental OIDs, you can use the `charts.multiply_range` option.
371
-
372
- This is like the SNMPv1/2 example, but the option will multiply the current chart from 1 to 24 inclusive, producing 24 charts in total for the 24 ports of the switch `192.0.2.1`.
373
-
374
- Each of the 24 new charts will have its id (1-24) appended at:
375
-
376
- - its chart unique `id`, i.e. `bandwidth_port_1` to `bandwidth_port_24`.
377
- - its title, i.e. `Switch Bandwidth for port 1` to `Switch Bandwidth for port 24`.
378
- - 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`.
379
- - its `priority` will be incremented for each chart so that the charts will appear on the dashboard in this order.
380
- config: |
381
- jobs:
382
- - name: switch
383
- update_every: 10
384
- hostname: "192.0.2.1"
385
- community: public
386
- options:
387
- version: 2
388
- charts:
389
- - id: "bandwidth_port"
390
- title: "Switch Bandwidth for port"
391
- units: "kilobits/s"
392
- type: "area"
393
- family: "ports"
394
- multiply_range: [1, 24]
395
- dimensions:
396
- - name: "in"
397
- oid: "1.3.6.1.2.1.2.2.1.10"
398
- algorithm: "incremental"
399
- multiplier: 8
400
- divisor: 1000
401
- - name: "out"
402
- oid: "1.3.6.1.2.1.2.2.1.16"
403
- multiplier: -8
404
- divisor: 1000
405
- - name: Multiple devices with a common configuration
406
- description: |
407
- YAML supports [anchors](https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases).
408
- The `&` defines and names an anchor, and the `*` uses it. `<<: *anchor` means, inject the anchor, then extend. We can use anchors to share the common configuration for multiple devices.
409
-
410
- The following example:
411
-
412
- - adds an `anchor` to the first job.
413
- - injects (copies) the first job configuration to the second and updates `name` and `hostname` parameters.
414
- - injects (copies) the first job configuration to the third and updates `name` and `hostname` parameters.
415
- config: |
416
- jobs:
417
- - &anchor
418
- name: switch
419
- update_every: 10
420
- hostname: "192.0.2.1"
421
- community: public
422
- options:
423
- version: 2
424
- charts:
425
- - id: "bandwidth_port1"
426
- title: "Switch Bandwidth for port 1"
427
- units: "kilobits/s"
428
- type: "area"
429
- family: "ports"
430
- dimensions:
431
- - name: "in"
432
- oid: "1.3.6.1.2.1.2.2.1.10.1"
433
- algorithm: "incremental"
434
- multiplier: 8
435
- divisor: 1000
436
- - name: "out"
437
- oid: "1.3.6.1.2.1.2.2.1.16.1"
438
- multiplier: -8
439
- divisor: 1000
440
- - <<: *anchor
441
- name: switch2
442
- hostname: "192.0.2.2"
443
- - <<: *anchor
444
- name: switch3
445
- hostname: "192.0.2.3"
260
troubleshooting:
261
problems:
262
list: []