mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Set SNMP scanner default timings to 10m/5s
A typical router keeps active devices' ARP entries fresh continuously, so a 10-minute poll interval stays well within common ARP cache TTLs while keeping device-event churn modest (each poll records a DeviceSeen event per device). A 5s per-request timeout adds margin for a busy agent or large ARP table at no cost on the happy path. Updates the default in settings.rs and the sample TOML, README and NixOS module. TODO timing-review item narrowed to the ARP scanner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2987f66363
commit
b283699b3c
@@ -148,8 +148,8 @@ If you are using Docker I recommend writing the config using TOML, [here](https:
|
||||
|`snmp_scanner.enabled`|`true` when the section is present, otherwise off|Whether to run the SNMP scanner. The whole `[snmp_scanner]` section is optional and the scanner stays off unless you add it; within the section it defaults to enabled.|
|
||||
|`snmp_scanner.target`||SNMP agent to poll, as `host:port` (e.g. your gateway: `192.168.1.1:161`). The scanner reads the agent's ARP table over SNMPv2c — no local probing.|
|
||||
|`snmp_scanner.community`||SNMPv2c read-only community string. Use a read-only community and never commit a real secret.|
|
||||
|`snmp_scanner.wait_between_scans`|`2m`|Time to wait between polls. Keep it well under the agent's ARP cache timeout so active devices aren't missed.|
|
||||
|`snmp_scanner.timeout`|`3s`|Per-poll SNMP request timeout.|
|
||||
|`snmp_scanner.wait_between_scans`|`10m`|Time to wait between polls. Keep it well under the agent's ARP cache timeout so active devices aren't missed.|
|
||||
|`snmp_scanner.timeout`|`5s`|Per-poll SNMP request timeout.|
|
||||
|`notifications.method`|`pushover`|For now just pushover, you can set this to "none" to avoid sending notifications (it will just log)|
|
||||
|`notifications.notify_when_not_seen_for`|`1w`|Send a notification if a device comes back online after not being seen for this timeframe (you can use hours, weeks, etc.)|
|
||||
|`notifications.pushover.token`||Your pushover token goes here, just copy&paste from their website after creating the app|
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
- [x] Add configuration options to enable/disable each scanner
|
||||
- [ ] Implement the pushover API call directly to support HTML content and review notification text to use it
|
||||
- [ ] Add "devices seen on last scan" to the ARP and SNMP scanners status
|
||||
- [ ] Review the recommended timings for ARP and SNMP scanners (change defaults)
|
||||
- [ ] Review the recommended timings for the ARP scanner (change defaults) — SNMP defaults set to 10m/5s
|
||||
|
||||
## Frontend
|
||||
|
||||
|
||||
@@ -98,8 +98,8 @@ impl Default for SnmpScanner {
|
||||
enabled: false,
|
||||
target: String::new(),
|
||||
community: String::new(),
|
||||
wait_between_scans: DurationString::try_from("2m".to_string()).unwrap(),
|
||||
timeout: DurationString::try_from("3s".to_string()).unwrap(),
|
||||
wait_between_scans: DurationString::try_from("10m".to_string()).unwrap(),
|
||||
timeout: DurationString::try_from("5s".to_string()).unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ enabled=true # Set to false to disable the DHCP scanner
|
||||
# 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.
|
||||
# wait_between_scans="10m" # Wait time between polls. Keep this well under the agent's ARP cache timeout so active devices aren't missed.
|
||||
# timeout="5s" # 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.
|
||||
|
||||
@@ -94,12 +94,12 @@ in {
|
||||
snmp_scanner.wait_between_scans = mkOption {
|
||||
type = types.str;
|
||||
description = "Wait time between SNMP polls. Keep it well under the agent's ARP cache timeout so active devices aren't missed.";
|
||||
default = "2m";
|
||||
default = "10m";
|
||||
};
|
||||
snmp_scanner.timeout = mkOption {
|
||||
type = types.str;
|
||||
description = "Per-poll SNMP request timeout.";
|
||||
default = "3s";
|
||||
default = "5s";
|
||||
};
|
||||
notifications.method = mkOption {
|
||||
type = types.str;
|
||||
|
||||
Reference in New Issue
Block a user