Skip to content

Commit

Permalink
Merge branch 'release/0.6.3' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
simonreeves committed May 10, 2023
2 parents 737e241 + 6bf100a commit b34d431
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions an_farmview/snmp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import pysnmp.hlapi

from .config import settings
Expand All @@ -10,8 +9,8 @@ def get_sensor(oid):

iterator = pysnmp.hlapi.getCmd(
pysnmp.hlapi.SnmpEngine(),
pysnmp.hlapi.CommunityData(os.getenv('SNMP_COMMUNITY')),
pysnmp.hlapi.UdpTransportTarget((os.getenv('SNMP_IP'), 161)),
pysnmp.hlapi.CommunityData(settings.snmp_community),
pysnmp.hlapi.UdpTransportTarget((settings.snmp_ip, 161)),
pysnmp.hlapi.ContextData(),
pysnmp.hlapi.ObjectType(pysnmp.hlapi.ObjectIdentity(oid))
)
Expand Down

0 comments on commit b34d431

Please sign in to comment.