mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add SNMP scanner that polls a gateway's ARP table
Introduce a sixth scanner that periodically queries an SNMP agent
(typically the router/firewall) for its ARP/neighbour cache via
SNMPv2c and feeds discovered devices into the shared devices, events
and notifications pipeline. Unlike the ARP scanner it generates no
traffic on the local segment and can surface devices across all
subnets the agent routes.
Scope is intentionally minimal: SNMPv2c only, a single target, and the
ipNetToMediaTable (ARP) only. SNMPv3 and switch MAC/forwarding-table
polling are left as follow-ups in TODO.md.
- backend: csnmp dependency; SnmpScanner config (opt-in, off unless a
[snmp_scanner] section is present); DeviceEventScanner::Snmp;
scanners/snmp/{finder,scanner,status}; main.rs wiring; status API
endpoint wired into OpenAPI
- frontend: SNMP scanner status model, card, API method, status screen
and summary card rows, and device-event label
- docs/config: sample TOML, README options, NixOS module option, and
setup notes for enabling SNMP on pfSense/OPNsense
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
20c51faaea
commit
2987f66363
@@ -24,6 +24,16 @@ probe_timeout="2s" # When an SSDP/UPnP-discovered IP is not in the OS ARP cache,
|
||||
[dhcp_scanner]
|
||||
enabled=true # Set to false to disable the DHCP scanner
|
||||
|
||||
# [snmp_scanner] # Optional: poll a router/firewall's ARP table over SNMP. Disabled unless this section is present.
|
||||
# enabled=true # Set to false to disable the SNMP scanner without removing this section
|
||||
# target="192.168.1.1:161" # SNMP agent to poll, as host:port. Point this at your gateway (router/firewall).
|
||||
# community="public" # SNMPv2c read-only community string. Use a read-only community; never commit a real secret here.
|
||||
# wait_between_scans="2m" # Wait time between polls. Keep this well under the agent's ARP cache timeout so active devices aren't missed.
|
||||
# timeout="3s" # Per-poll SNMP request timeout.
|
||||
# Note: SNMP must be enabled on the target. On pfSense: Services > SNMP (v2c; the mibII module exposes the ARP table).
|
||||
# On OPNsense: install the os-net-snmp plugin, then Services > Net-SNMP. In both cases add a firewall rule allowing
|
||||
# UDP/161 from the host running OOTT.
|
||||
|
||||
[notifications]
|
||||
method="pushover" # For now just pushover, you can set this to "none" to avoid sending notifications (it will just log)
|
||||
notify_when_not_seen_for="1w" # Send a notification if a device comes back online after not being seen for this timeframe
|
||||
|
||||
Reference in New Issue
Block a user