SNMP Configuration on top of v2.7.0-119-nightly agents

Hello!

My netdata agent upgraded recently and I just realized that my snmp configuration is no longer working properly. My main issue is not that it’s included in the metrics but that it’s not adding my own charts which is the reason why I need them. I’m including my old configuration (removed any sensitive IPs):

jobs:
  - name: snmp_r4spdu1
    update_every: 5
    hostname: "0.0.0.0"
    community: "RackPDU"
    options:
      version: 2
      max_request_size: 50
      timeout: 20000
    charts:
      - id: "snmp_r4spdu1.energy"
        title: "Energy consumption"
        units: "kWh"
        type: "area"
        priority: 10
        family: "kWh"
        dimensions:
          - name: "name"
            oid: ".1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"
            algorithm: "absolute"
            divisor: 10
            offset: 0
      - id: "snmp_r4spdu1.power"
        title: "Real Power consumption"
        units: "W"
        type: "area"
        priority: 10
        family: "W"
        dimensions:
          - name: "name"
            oid: ".1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"
            algorithm: "absolute"
            divisor: 1
            offset: 0

Thank you in advance!

Hi, @jgeorg02.

We’ve deprecated and removed the legacy SNMP data collection — please see the v2.7.0 release notes for details. SNMP collection is now profile-based.

You have two options:

  1. Switch to the stable version (v2.7.2) and re-enable legacy SNMP collection by setting:

disable_legacy_collection: no

  1. Create a custom SNMP profile and place it in /etc/netdata/go.d/snmp.profiles/default (or /opt/netdata/etc/netdata/go.d/snmp.profiles/default depends on your install method).

The profile syntax documentation is still a work in progress, but you can refer to the existing stock SNMP profiles for examples.

Unfortunately I can’t switch to v2.7.2 since it’s not available on my apt-list (I have ubuntu 22.04 and ideally I want to upgrade it right now to 24.04).

However, I tried disable_legacy_collection: no and it’s not working. I checked on your documentation and it should have worked on v2.7.0 too. I also tried setting to false but it’s not working either. You need to update your documentation as well because here: SNMP devices | Netdata in the examples you can set oid and it doesn’t show that configuration and you say that it needs to be set as false and in your github updates it says to set it as “no”.

Is there any command I can try to check if my disable_legacy_collection: no is being overridden or smth?

Because you are using the nightly version and the nightly version has removed old functionality. It is in the release notes too.

v2.7.0-119 > v2.7.2.

ou need to update your documentation as well because here: SNMP devices | Netdata

Good catch, thanks! The integrations on the Netdata website aren’t in sync with the docs yet. The SNMP docs on Learn are up to date, though.

Added documentation for the SNMP Profile Format. It’s a separate document, now linked from the SNMP collector documentation.

Hello, I managed to switch to 2.7.0 and with the disable_legacy_collection: no option it worked.

Thank you :slight_smile:

Hi again,

I have another question related to this, although my charts are now visible again from the UI, unfortunately is not included in the api’s charts, do you might have any idea why is this happening? Do I need to set this somehow on the configuration?

It is because of the virtual node config option.

Oh thank you! Now it’s working perfectly, thank you again!