Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add SNMP Monitor #4717

Merged
merged 75 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
d92003e
SNMP Initial Commits
mattv8 Apr 27, 2024
a3cdd69
Use net-snmp instead of snmp-native
mattv8 Apr 29, 2024
ff5890a
Updated a comment
mattv8 Apr 29, 2024
4a882be
Further SNMP monitor development
mattv8 Apr 29, 2024
99dc4cf
Wrong variable used
mattv8 Apr 30, 2024
138075a
Update db migration: allow nulls
mattv8 Apr 30, 2024
9c8024c
Update db migration: down function
mattv8 Apr 30, 2024
9d28fcf
Update bean model backend
mattv8 Apr 30, 2024
4593afb
Frontend input validation
mattv8 Apr 30, 2024
9848ce4
Minor frontend styling
mattv8 Apr 30, 2024
704ffd3
Finalized SNMP monitor
mattv8 Apr 30, 2024
b4bd003
Merge branch 'master' into snmp-monitor
CommanderStorm Apr 30, 2024
ba47aca
Apply suggestions from code review
mattv8 Apr 30, 2024
7459654
ES Lint Compliant
mattv8 May 1, 2024
e944492
Corrected down function
mattv8 May 1, 2024
97a9094
ES Lint Compliant
mattv8 May 1, 2024
9ba0f68
Remove supurfluous log.debug
mattv8 May 1, 2024
ba84f01
Delete .EditMonitor.vue.swp
mattv8 May 1, 2024
4699a1c
ES Lint Compliant
mattv8 May 1, 2024
d83c2b9
Revert unintentional changes to EditMonitor.vue
mattv8 May 2, 2024
f059d54
Use frontend timeout
mattv8 May 2, 2024
8e56a81
Refactor how strings/numerics are parsed
mattv8 May 2, 2024
c87ac2f
Move getKey() to util.ts
mattv8 May 3, 2024
09fd816
Updated code comments
mattv8 May 3, 2024
407f729
New dependency for net-snmp
mattv8 May 3, 2024
9053b48
Merge branch 'louislam:master' into snmp-monitor
mattv8 May 3, 2024
4386d0a
Apply suggestions from code review
mattv8 May 5, 2024
0280b2a
A comment about varbinds[0] for clarification
mattv8 May 6, 2024
86b997c
Limit to <= SNMPv2c for now
mattv8 May 6, 2024
0384b34
Remove unnecessary func getKey
mattv8 May 6, 2024
997791b
Default: invalid condition error
mattv8 May 6, 2024
1fe1bb5
Given that above throws, the else case is not nessesary
mattv8 May 6, 2024
433e317
Simplify error catch
mattv8 May 6, 2024
6037912
Consistent placeholder text
mattv8 May 6, 2024
c68b1c6
Remove unnecessary func getKey
mattv8 May 6, 2024
e9b52eb
Separate error cases for SNMP varbind returns
mattv8 May 6, 2024
4ef66b3
SNMP version helptext
mattv8 May 6, 2024
19f21a9
SNMP OID helptext
mattv8 May 6, 2024
56e7fa8
Helptext ALL THE THINGS
mattv8 May 6, 2024
f4842ea
Translation key for OID
mattv8 May 6, 2024
2b5d100
Ensure SNMP session is closed properly
mattv8 May 6, 2024
e5fb726
Missed changes leftover from removal of getKey()
mattv8 May 7, 2024
2015142
Maybe don't helptext all the things...
mattv8 May 7, 2024
8b4b27f
Final cleanup of changes to EditMonitor.vue
mattv8 May 7, 2024
da8f0d1
Apply suggestions from code review
mattv8 May 8, 2024
1c47407
Re-use monitor.radiusPassword for community string
mattv8 May 8, 2024
c475994
Fix ES Lint
mattv8 May 8, 2024
d25ee8f
Using JSON Query Expressions
mattv8 May 10, 2024
7eee5db
Variable changes
mattv8 Jun 5, 2024
b2d76bc
Refactor line for conciseness
mattv8 Jun 5, 2024
2d2c186
Fix: a typo
mattv8 Jun 5, 2024
efb1642
Blend json-query and snmp monitors
mattv8 Jun 5, 2024
36dc94b
Better type handling
mattv8 Jun 6, 2024
10d3188
Query json directly rather than with $.value
mattv8 Jun 6, 2024
eaa935c
Also return result of the evaluation
mattv8 Jun 6, 2024
fdc145b
Added Robustness
mattv8 Jun 7, 2024
23f844d
Error handling robustness
mattv8 Jun 7, 2024
8235291
Fix: Cast to string then eval
mattv8 Jun 10, 2024
e2e8109
Helpful error when query returns object or array
mattv8 Jun 10, 2024
43bd09b
Update 2024-04-26-0000-snmp-monitor.js
mattv8 Jun 10, 2024
69c22ed
Removed "Control Value"
mattv8 Jun 12, 2024
5dc4bb6
Merge branch 'master' into snmp-monitor
CommanderStorm Jun 12, 2024
b5a73e5
Apply suggestions from code review
mattv8 Jun 12, 2024
248aec8
Formtting fix
CommanderStorm Jun 12, 2024
c124f3a
Formtting fix
CommanderStorm Jun 12, 2024
9820f57
Truncate long responses
mattv8 Jun 13, 2024
6fc0cbf
ES Lint
mattv8 Jun 13, 2024
092688a
ES Lint
mattv8 Jun 13, 2024
46ecb82
"Hostname or IP Address" back to "Hostname"
mattv8 Jun 13, 2024
a1f31f9
Remove jsonQueryDescription from lang files
mattv8 Jun 13, 2024
e237d66
"Hostname or IP Address" back to "Hostname"
mattv8 Jun 13, 2024
a037448
C&P typo from review
mattv8 Jun 14, 2024
8d8ce23
Robustness and edge-case handling
mattv8 Jun 14, 2024
71f9384
Merge branch 'master' into snmp-monitor
CommanderStorm Jul 15, 2024
c82de20
fixed merge-typo
CommanderStorm Jul 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use net-snmp instead of snmp-native
net-snmp over snmp-native is:
-more robust
-more popular
-better documented
-supports v3
  • Loading branch information
mattv8 committed Apr 29, 2024
commit a3cdd69995a138a27fac31866e3993b3a44d3c67
16 changes: 10 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion server/monitor-types/snmp.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down