Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container does not support new snmp.yml format #905

Closed
erroltuparker opened this issue Jul 4, 2023 · 4 comments
Closed

Docker container does not support new snmp.yml format #905

erroltuparker opened this issue Jul 4, 2023 · 4 comments

Comments

@erroltuparker
Copy link

Host operating system: output of uname -a

5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

v0.22.0
v0.21.0

What did you do that produced an error?

updated prom/snmp-exporter container and deployed the new configuration format outputted from generator.

auths:
  authv2:
    community: public
    security_level: noAuthNoPriv
    auth_protocol: MD5
    priv_protocol: DES
    version: 2
modules:
  if_mib:
    walk:
    - 1.3.6.1.2.1.1
    - 1.3.6.1.2.1.131
    - 1.3.6.1.2.1.2
    - 1.3.6.1.2.1.25
    - 1.3.6.1.2.1.31
    - 1.3.6.1.2.1.47
    - 1.3.6.1.2.1.99
    metrics:
    - name: sysDescr
      oid: 1.3.6.1.2.1.1.1
      type: DisplayString
      help: A textual description of the entity - 1.3.6.1.2.1.1.1
version: 2

What did you expect to see?

Successful load of prom/snmp-exporter container. Reverted to provided snmp.yml from this repo for testing and it also cannot load. Tried both v0.22.0 and v0.21.0 and same issue occurs.

What did you see instead?

ts=2023-07-04T02:01:43.523Z caller=main.go:148 level=info msg="Starting snmp_exporter" version="(version=0.21.0, branch=HEAD, revision=0d8c3527cac0c26f1d6005b84b74413d14264c37)"
ts=2023-07-04T02:01:43.523Z caller=main.go:149 level=info build_context="(go=go1.19.3, user=root@51dfd4b1f59b, date=20221122-15:14:18)"
ts=2023-07-04T02:01:43.646Z caller=main.go:157 level=error msg="Error parsing config file" err="yaml: unmarshal errors:\n  line 3: field public_v1 not found in type config.plain\n  line 9: field public_v2 not found in type config
.plain\n  line 16: field apcups not found in type config.plain\n  line 2374: field arista_sw not found in type config.plain\n  line 2949: field cisco_wlc not found in type config.plain\n  line 3395: field cyberpower not found in
type config.plain\n  line 6007: field ddwrt not found in type config.plain\n  line 6442: field if_mib not found in type config.plain\n  line 7699: field infrapower_pdu not found in type config.plain\n  line 7777: field keepalived
 not found in type config.plain\n  line 9633: field kemp_loadmaster not found in type config.plain\n  line 10396: field liebert_pdu not found in type config.plain\n  line 12902: field mikrotik not found in type config.plain\n  li
ne 16180: field nec_ix not found in type config.plain\n  line 18459: field paloalto_fw not found in type config.plain\n  line 19548: field printer_mib not found in type config.plain\n  line 19751: field raritan not found in type
config.plain\n  line 19878: field servertech_sentry3 not found in type config.plain\n  line 20407: field servertech_sentry4 not found in type config.plain\n  line 22740: field synology not found in type config.plain\n  line 24515
: field ubiquiti_airfiber not found in type config.plain\n  line 25700: field ubiquiti_airmax not found in type config.plain\n  line 26344: field ubiquiti_unifi not found in type config.plain\n  line 26973: field wiener_mpod not
found in type config.plain\n  line 49217: cannot unmarshal !!int `2` into config.plain"

Setting snmp.yml back to the old format below works as expected.

if_mib:
  version: 2
  auth:
    community: public
  walk:
  - 1.3.6.1.2.1.1
  - 1.3.6.1.2.1.131
  - 1.3.6.1.2.1.2
  - 1.3.6.1.2.1.25
  - 1.3.6.1.2.1.31
  - 1.3.6.1.2.1.47
  - 1.3.6.1.2.1.99
  metrics:
  - name: sysDescr
    oid: 1.3.6.1.2.1.1.1
    type: DisplayString
    help: A textual description of the entity - 1.3.6.1.2.1.1.1
@SuperQ
Copy link
Member

SuperQ commented Jul 4, 2023

Thew new format is not released yet.

@SuperQ SuperQ closed this as completed Jul 4, 2023
@erroltuparker
Copy link
Author

Then how come the generator has been updated on the main project to use the new format?

@nathanbent
Copy link

Is the new format not released to the Docker? Or not released in general? Trying to set snmp_exporter up and this seems to be the issue on Docker

@SuperQ
Copy link
Member

SuperQ commented Jul 4, 2023

Not released in general. The changes have been merged to main but are still pending release (#906)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants