Package: prometheus-snmp-exporter
Version: 0.19.0+ds-1+b5
Severity: normal

Dear Maintainer,

Sorry for reporting for the bullseye version; tried to build a backport
from Salsa (0.21.0-1), but that gave me
-- >8 --
github.com/prometheus/client_golang/prometheus/promauto
github.com/prometheus/common/version
github.com/mwitkow/go-conntrack
github.com/prometheus/client_golang/prometheus/promhttp
github.com/prometheus/snmp_exporter/collector
# github.com/prometheus/snmp_exporter/collector
src/github.com/prometheus/snmp_exporter/collector/collector.go:123:24: cannot 
use config.WalkParams.MaxRepetitions (variable of type uint32) as type uint8 in 
assignment
src/github.com/prometheus/snmp_exporter/collector/collector.go:126:7: 
snmp.UseUnconnectedUDPSocket undefined (type gosnmp.GoSNMP has no field or 
method UseUnconnectedUDPSocket)
src/github.com/prometheus/snmp_exporter/collector/collector.go:127:7: 
snmp.LocalAddr undefined (type gosnmp.GoSNMP has no field or method LocalAddr)
src/github.com/prometheus/snmp_exporter/collector/collector.go:136:7: 
snmp.OnSent undefined (type gosnmp.GoSNMP has no field or method OnSent)
src/github.com/prometheus/snmp_exporter/collector/collector.go:141:7: 
snmp.OnRecv undefined (type gosnmp.GoSNMP has no field or method OnRecv)
src/github.com/prometheus/snmp_exporter/collector/collector.go:144:7: 
snmp.OnRetry undefined (type gosnmp.GoSNMP has no field or method OnRetry)
github.com/prometheus/common/config
github.com/prometheus/exporter-toolkit/web
github.com/prometheus/exporter-toolkit/web/kingpinflag
dh_auto_build: error: cd build && go install -trimpath -v -p 24 -tags  -ldflags 
" -X github.com/prometheus/common/version.Version=0.21.0 -X 
github.com/prometheus/common/version.Revision=0.21.0-1 -X 
github.com/prometheus/common/version.Branch=debian/sid -X 
github.com/prometheus/common/version.BuildUser=team+pkg...@tracker.debian.org 
-X github.com/prometheus/common/version.BuildDate=20221124-01:44:11 -X 
github.com/prometheus/common/version.GoVersion=go1.19.5" 
github.com/prometheus/snmp_exporter 
github.com/prometheus/snmp_exporter/collector 
github.com/prometheus/snmp_exporter/config 
github.com/prometheus/snmp_exporter/generator returned exit code 2
make[1]: *** [debian/rules:34: override_dh_auto_build] Error 25
make[1]: Leaving directory 
'/home/nabijaczleweli/backports/build-output/prometheus-snmp-exporter-0.21.0'
make: *** [debian/rules:31: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i -I -sa failed
gbp:error: 'debuild -i -I -sa -us -uc' failed: it exited with 29
-- >8 --
and I don't strictly feel like chasing down dependency versioning snafus;
I skimmed through the changelogs since 0.19 on
  https://github.com/prometheus/snmp_exporter/releases
and there doesn't appear to be anything there relevant to this.


Now; generator.yml:
-- >8 --
modules:
  orno_or_we_504_505_507:
    walk:
      - ORNO-MIB::orno
-- >8 --

/etc/snmp/snmp.conf:
-- >8 --
mibs +ORNO-MIB
mibdirs 
/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/local/share/snmp/mibs

defVersion 2c
defCommunity public
-- >8 --

And naturally:
-- >8 --
$ snmpbulkwalk -Cc ciastko-malinowe ORNO-MIB::orno
ORNO-MIB::ornoOrWe504DeviceIndex.1 = INTEGER: 1
ORNO-MIB::ornoOrWe504Voltage.1 = INTEGER: 239.9 V
...
ORNO-MIB::ornoOrWe505Duration.1 = Timeticks: (8644750) 1 day, 0:00:47.50
ORNO-MIB::ornoOrWe505Energy.1 = INTEGER: 19601 Wh
-- >8 --

So why then:
-- >8 --
$ prometheus-snmp-generator  generate
level=info ts=2023-02-28T14:13:48.169Z caller=net_snmp.go:142 msg="Loading 
MIBs" 
from=$HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf
level=info ts=2023-02-28T14:13:48.684Z caller=main.go:52 msg="Generating config 
for module" module=orno_or_we_504_505_507
level=error ts=2023-02-28T14:13:48.723Z caller=main.go:130 msg="Error 
generating config netsnmp" err="cannot find oid 'ORNO-MIB::orno' to walk"
-- >8 --

The manual doesn't note a way to change the path, and I don't really see
why I'd want to change it instead of it just using the one from the config.

Best,
наб

ORNO-MIB can be found at
  
https://git.sr.ht/~nabijaczleweli/ORNO-OR-WE-504-505-507-snmp/tree/03d104a05c7e6e0314f38ccf9be78dd10b5e1955/item/ORNO-MIB

-- System Information:
Debian Release: 11.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-20-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages prometheus-snmp-exporter depends on:
ii  adduser              3.118
ii  init-system-helpers  1.60
ii  libc6                2.31-13+deb11u5
ii  libsnmp40            5.9+dfsg-4+deb11u1

prometheus-snmp-exporter recommends no packages.

prometheus-snmp-exporter suggests no packages.

-- no debconf information

Attachment: signature.asc
Description: PGP signature

Reply via email to