-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Hello 👋
I am trying to set up a device-snmp with EdgeX to acquire some data. Everything is done using version 1.3.1
. I'm still at the PoC stage, so I am mocking a device using snmpsim.
The issue
The device-snmp is so far failing to acquire any data from the mocked device. Here are the logs:
dgex-device-snmp-test | level=DEBUG ts=2021-07-19T13:31:59.288215646Z app=device-snmp-go_snmp-test source=executor.go:55 msg="AutoEvent - executing {\"frequency\":\"1s\",\"resource\":\"HelloWorld\"}"
edgex-device-snmp-test | level=DEBUG ts=2021-07-19T13:31:59.288330539Z app=device-snmp-go_snmp-test source=command.go:138 msg="Handler - execReadCmd: deviceResource: HelloWorld"
edgex-device-snmp-test | level=DEBUG ts=2021-07-19T13:31:59.288410389Z app=device-snmp-go_snmp-test source=snmpdriver.go:65 1024= msg="Port %s"
edgex-device-snmp-test | level=DEBUG ts=2021-07-19T13:31:59.288454111Z app=device-snmp-go_snmp-test source=snmpdriver.go:66 172.17.0.1= msg=Address
edgex-device-snmp-test | level=DEBUG ts=2021-07-19T13:31:59.288499128Z app=device-snmp-go_snmp-test source=snmpdriver.go:71 msg="SNMPDriver.HandleReadCommand: device: test-snmp-device operation: HelloWorld attributes: map[community:sample oid:1.3.6.1.2.1.1.1.0]"
edgex-device-snmp-test | level=ERROR ts=2021-07-19T13:32:29.289741645Z app=device-snmp-go_snmp-test source=snmpdriver.go:91 msg="SNMPDriver.HandleReadCommands; Request timeout (after 3 retries)"
edgex-device-snmp-test | level=DEBUG ts=2021-07-19T13:32:29.290076447Z app=device-snmp-go_snmp-test source=utils.go:295 msg="Update of last connected times is disabled for: test-snmp-device"
My configuration
Attached to this issue are all the config files device-snmp-config.zip Here are the highlights:
snmpsim
exposes an OID1.3.6.1.2.1.1.1.0
which returns the stringHello world
.snmpsim
runs natively on my Ubuntu machine and the Edgex microservices run with Docker, using abridge
network.- I started
snmpsim
with endpoint172.17.0.1:1024
. I gave the same IP address and port to the device provisioned in the DeviceList:
[[DeviceList]]
Name = 'test-snmp-device'
Profile = 'test-snmp-profile'
Description = 'device snmp de test'
Labels = [ '' ]
[DeviceList.Protocols]
[DeviceList.Protocols.TCP]
Address = '172.17.0.1'
Port = '1024'
[[DeviceList.AutoEvents]]
Frequency = '1s'
OnChange = false
Resource = 'HelloWorld'
- The mocked snmp device uses community name "sample", which is the same as in the device profile:
name: "test-snmp-profile"
manufacturer: ""
model: "NHL-FB2"
labels:
- "snmp"
description: "profil test snmp"
deviceResources:
-
name: HelloWorld
description: "get Hello world"
attributes:
{ oid: "1.3.6.1.2.1.1.1.0", community: "sample" }
properties:
valueType: "String"
readWrite: "R"
The debugging I tried
At first I thought the problem was related to some networking misconfiguration. However, I entered in the device-snmp running container and was able to acquire the data from my mocked device using snmpwalk command:
snmpwalk -v2c -c sample 172.17.0.1:1024 1.3.6.1.2.1.1.1.0
which yielded the correct payload: SNMPv2-MIB::sysDescr.0 = STRING: Hello world
I suspect my problem is either my Edgex configuration is wrong, or that there is a bug inside device-snmp. Am I missing something?
Thank you,
Sam
Metadata
Metadata
Assignees
Labels
Type
Projects
Status