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

snmp multi module support #2438

Open
v-zhuravlev opened this issue Jan 17, 2025 · 1 comment
Open

snmp multi module support #2438

v-zhuravlev opened this issue Jan 17, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@v-zhuravlev
Copy link

v-zhuravlev commented Jan 17, 2025

What's wrong?

I'm trying to use multi module functionality of https://github.com/prometheus/snmp_exporter in snmp exporter of alloy.

Does alloy support multi module polling the same way upstream exporter?

Alloy version:
alloy --version
alloy, version v1.5.1 (branch: HEAD, revision: dc8a365)
build user: root@19aa8bb023d9
build date: 2024-12-03T16:39:10Z
go version: go1.22.7
platform: linux/arm64
tags: netgo,builtinassets,promtail_journal_enabled

snmp_exporter standalone version:
snmp_exporter-0.27.0.linux-arm64

Steps to reproduce

  1. Setup alloy in with snmp config:
prometheus.exporter.snmp "integrations_snmp" {

target "snmp_sample_app" {
    address = "127.0.0.1"
    module  = "if_mib"
    auth    = "public_v2"
  }
}

Then try to run

 curl -k "http://localhost:12345/api/v0/component/prometheus.exporter.snmp.integrations_snmp/metrics?auth=public_v2&name=snmp_sampl
e_app&module=if_mib,cisco_wlc&target=127.0.0.1"

Unknown module 'if_mib,cisco_wlc'

Try the same with snmp_exporter:

./snmp_exporter &
curl -k "http://localhost:9116/snmp?module=if_mib,cisco_wlc&target=127.0.0.1&auth=public_v2"

and you would get metrics output or errror like "socket: read udp 127.0.0.1:33610->127.0.0.1:161: recvfrom: connection refused" if snmpd is not setup . Anyway, you would pass "Unknown module" error you get in alloy.

@v-zhuravlev v-zhuravlev added the bug Something isn't working label Jan 17, 2025
@thampiotr thampiotr self-assigned this Jan 17, 2025
@Nachtfalkeaw
Copy link

Nachtfalkeaw commented Jan 18, 2025

@v-zhuravlev
Alloy 1.5.1 was released in Dezember 2024 and snmp_exporter in january 2025. I think it is Impossible to have a new Feature in an old Version.

And alloy 1.6.x does Not list any snmp_exporter Changes
https://github.com/grafana/alloy/blob/main/CHANGELOG.md

And Here the alloy snmp config documentation
https://grafana.com/docs/alloy/latest/reference/components/prometheus/prometheus.exporter.snmp/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants