unsupported config version

86 views
Skip to first unread message

Felipe Oliveira do Rosario

unread,
Jul 17, 2023, 4:13:56 PM7/17/23
to Prometheus Users
Hi everyone, I'm trying to use generator.yaml for Juniper or Fortigate and with version 3 I'm getting the following error:

ts=2023-07-17T18:14:53.048Z caller=main.go:136 level=error msg="Error generating config netsnmp" err="unsupported config version"

Honestly, I don't know where I'm going wrong, I would like your help because with this same configuration using version 2 I can generate the snmp.yaml as expected for both Juniper and Fortigate, Cisco, etc, but for security reasons I need to use snmpv3, and when I try to use it I always get the same error.. can you please help me? Follow my example file!
At first I thought it was the indentation, but it's not because with versions 1 and 2 it works normally.

Note: Remembering that all my devices already have snmp enabled!
---
# The generator config format version.
auths:
   v3:
     version: 3
     username: xxxx
     password: xxxx
     auth_protocol: SHA
     priv_protocol: AES
     security_level: authPriv
     priv_password: xxxx

modules:
   juniper:
     walk: [sysUpTime, interfaces, ifXTable]
     lookups:
       - source_indexes: [ifIndex]
         lookup: ifAlias
       - source_indexes: [ifIndex]
         lookup: 1.3.6.1.2.1.2.2.1.2
       - source_indexes: [ifIndex]
         lookup: 1.3.6.1.2.1.31.1.1.1.1
     overrides:
       ifAlias:
         ignore: true
       ifDescr:
         ignore: true
       ifName:
         ignore: true
       ifType:
         type: EnumAsInfo

Ben Kochie

unread,
Jul 17, 2023, 4:16:24 PM7/17/23
to Felipe Oliveira do Rosario, Prometheus Users
Config version is a top level key for the new generator/exporter config formats. It's unrelated to SNMP protocol versions.

# The generator config format version.
version: 2
auths:
   v3:
     version: 3
...
modules:
...

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/92045a3a-7a58-4d3d-befd-b95769a82ea2n%40googlegroups.com.

Felipe Oliveira do Rosario

unread,
Jul 18, 2023, 4:06:47 PM7/18/23
to Prometheus Users

Hi Ben, i don't know if i understood well, you can explain for me please? Where i localize the config version ? What i need to do for use the snmpv3 correctly ? 

Brian Candler

unread,
Jul 19, 2023, 3:42:18 AM7/19/23
to Prometheus Users
You simply copy-paste what Ben showed.  To extend it slightly for clarity:

version: 2
auths:
  prod_router:
    version: 3
    security_level: authPriv
    username: admin
    auth_protocol: SHA
    password: tcpip123
    priv_protocol: AES
    priv_password: xyzzy
modules:
  ....

"version: 2" at the top of the file, refers to the config file version.  This is version 2 of the config file: that is, the new format which has separate "modules" and "auths" sections.

Under "auths", and below a named auth section like "prod_router" in the example above, "version: 3" refers to the SNMP version.

Reply all
Reply to author
Forward
0 new messages