Use net-snmp instead of snmp-native

net-snmp over snmp-native is:
-more robust
-more popular
-better documented
-supports v3
This commit is contained in:
Matt Visnovsky 2024-04-29 13:56:32 -06:00
parent d92003e172
commit a3cdd69995
3 changed files with 12 additions and 8 deletions

16
package-lock.json generated
View file

@ -54,6 +54,7 @@
"mssql": "~8.1.4",
"mysql2": "~3.6.2",
"nanoid": "~3.3.4",
"net-snmp": "^3.11.2",
"node-cloudflared-tunnel": "~1.0.9",
"node-radius-client": "~1.0.0",
"nodemailer": "~6.9.13",
@ -72,7 +73,6 @@
"redbean-node": "~0.3.0",
"redis": "~4.5.1",
"semver": "~7.5.4",
"snmp-native": "^1.2.0",
"socket.io": "~4.6.1",
"socket.io-client": "~4.6.1",
"socks-proxy-agent": "6.1.1",
@ -10337,6 +10337,15 @@
"node": ">= 0.6"
}
},
"node_modules/net-snmp": {
"version": "3.11.2",
"resolved": "https://registry.npmjs.org/net-snmp/-/net-snmp-3.11.2.tgz",
"integrity": "sha512-QKy2JQHIBsSK344dUxYRZv7tU0ANk8f8fzKD/Mmq/cCxm/cPbtiT7009QEgxdViW/gGjqGIOiLHxkCc+JhZltg==",
"dependencies": {
"asn1-ber": "^1.2.1",
"smart-buffer": "^4.1.0"
}
},
"node_modules/node-abort-controller": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz",
@ -12610,11 +12619,6 @@
"npm": ">= 3.0.0"
}
},
"node_modules/snmp-native": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/snmp-native/-/snmp-native-1.2.0.tgz",
"integrity": "sha512-JIyuLX3bQmuAI4gHztHSQd3M/M2hqgLhiHBZYEk8YnYRJ2ooxqwON4gUQfgp/WCZVDca4tIX3vFJgv6lz5iY+g=="
},
"node_modules/socket.io": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.2.tgz",

View file

@ -119,6 +119,7 @@
"mssql": "~8.1.4",
"mysql2": "~3.6.2",
"nanoid": "~3.3.4",
"net-snmp": "^3.11.2",
"node-cloudflared-tunnel": "~1.0.9",
"node-radius-client": "~1.0.0",
"nodemailer": "~6.9.13",
@ -137,7 +138,6 @@
"redbean-node": "~0.3.0",
"redis": "~4.5.1",
"semver": "~7.5.4",
"snmp-native": "^1.2.0",
"socket.io": "~4.6.1",
"socket.io-client": "~4.6.1",
"socks-proxy-agent": "6.1.1",

View file

@ -1,6 +1,6 @@
const { MonitorType } = require("./monitor-type");
const { UP, DOWN } = require("../../src/util");
const snmp = require("snmp-native");
const snmp = require("net-snmp");
class SNMPMonitorType extends MonitorType {
name = "snmp";