From 1c4740748cb2635689e6981d7da27aef9da8bec4 Mon Sep 17 00:00:00 2001 From: Matt Visnovsky Date: Wed, 8 May 2024 11:00:10 -0600 Subject: [PATCH] Re-use monitor.radiusPassword for community string --- server/model/monitor.js | 1 - server/monitor-types/snmp.js | 2 +- server/server.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index bd62d624b..3b267a60d 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -194,7 +194,6 @@ class Monitor extends BeanModel { tlsCert: this.tlsCert, tlsKey: this.tlsKey, kafkaProducerSaslOptions: JSON.parse(this.kafkaProducerSaslOptions), - snmpCommunityString: this.snmpCommunityString, }; } diff --git a/server/monitor-types/snmp.js b/server/monitor-types/snmp.js index 920e1fe28..b9dc39e88 100644 --- a/server/monitor-types/snmp.js +++ b/server/monitor-types/snmp.js @@ -19,7 +19,7 @@ class SNMPMonitorType extends MonitorType { let session; try { - session = snmp.createSession(monitor.hostname, monitor.snmpCommunityString, options); + session = snmp.createSession(monitor.hostname, monitor.radiusPassword, options); // Handle errors during session creation session.on("error", (error) => { diff --git a/server/server.js b/server/server.js index 7a147fce6..c61277628 100644 --- a/server/server.js +++ b/server/server.js @@ -831,7 +831,6 @@ let needSetup = false; bean.gamedigGivenPortOnly = monitor.gamedigGivenPortOnly; bean.remote_browser = monitor.remote_browser; bean.snmpVersion = monitor.snmpVersion; - bean.snmpCommunityString = monitor.snmpCommunityString; bean.snmpOid = monitor.snmpOid; bean.snmpCondition = monitor.snmpCondition; bean.snmpControlValue = monitor.snmpControlValue;