Commit graph

104 commits

Author SHA1 Message Date
3c00dcf37c remove passkeys for now 2026-01-31 09:50:35 -06:00
22ae257b60 refactor 2026-01-31 09:35:07 -06:00
6ca22c5dd0 enhance user auditing 2026-01-30 17:38:07 -06:00
1ace5b06af fix impersonate mfa and some dialyzer issues 2026-01-30 17:04:39 -06:00
ac66926367 agent overhaul 2026-01-30 16:05:23 -06:00
b663d484cf nif ci fix complie in ci 2026-01-30 12:47:18 -06:00
0214c2a100 complete overhaul of snmp engine to C nif 2026-01-30 12:27:12 -06:00
55e9397d59 user session tracking 2026-01-29 14:14:21 -06:00
c0736d4c2e gdpr consent tracking 2026-01-29 11:12:35 -06:00
58b1aa50c2 security fixes 2026-01-28 16:55:41 -06:00
9833f61043 login redirect fix 2026-01-28 15:18:08 -06:00
0995abbccb Add mandatory TOTP MFA 2026-01-28 15:09:38 -06:00
aed15dd6a1 impersonate fixes 2026-01-28 14:41:27 -06:00
8b71c4adb8 mib update from librenms 2026-01-28 13:38:31 -06:00
234ff7cbd2 add upsert support for geoip imports to prevent duplicates 2026-01-28 13:37:02 -06:00
d1fd1d4a62 remove Mix.env and support ip database import 2026-01-28 13:08:06 -06:00
220f1edce3 cookie improvements 2026-01-28 12:30:28 -06:00
588639a47a gdpr cookie consent 2026-01-28 10:52:40 -06:00
d34c72a0ab track more snmp things 2026-01-28 09:18:31 -06:00
88c003d474 major snmp overhaul 2026-01-28 09:07:13 -06:00
5fb92dd961
add device/org limit 2026-01-27 14:14:25 -06:00
3bb89670bd
enable agent debugging 2026-01-27 13:25:04 -06:00
328d4659a7
show correct agent on edit screen and fix airfiber/ltu 2026-01-27 12:52:43 -06:00
bb86dec559
add oban pro 2026-01-26 17:07:42 -06:00
19a818647b
documentation updates 2026-01-26 16:36:52 -06:00
b20a58aec4
test fixes 2026-01-26 15:27:59 -06:00
756a6b4cd4
poller agent fix and trigger device rediscovery 2026-01-26 14:51:32 -06:00
06fde717c0
accessibility and poller updates 2026-01-26 13:02:03 -06:00
99414459d3
device reorder 2026-01-26 10:22:12 -06:00
c36b1873eb
routeros fix 2026-01-25 16:59:32 -06:00
33c5b977b0
ssl ecto 2026-01-25 15:53:28 -06:00
984b1b38c7
add pg_stat_statements 2026-01-25 15:44:59 -06:00
6e86f54aa0
mikrotik sensor fixes 2026-01-25 13:24:28 -06:00
a23296ea34
fix: add missing sensor units to existing sensors
Sets sensor_unit for all sensors that are missing it, fixing sensors
created before the discovery code was updated to set units properly.

Updates:
- Temperature sensors: set to '°C'
- Voltage sensors: set to 'V'
- Current sensors: set to 'mA'
- Power sensors: set to 'W'
- dBm sensors: set to 'dBm'

This ensures the device detail page displays units correctly for all
sensor types (e.g., "27 °C" instead of "27" for temperature).

The discovery code already sets these units for new sensors, so this
migration only affects existing data.

Related to:
- lib/towerops/snmp/profiles/vendors/routeros.ex:690 (°C)
- lib/towerops/snmp/profiles/vendors/routeros.ex:709 (V)
- lib/towerops/snmp/profiles/base.ex:1473-1480 (sensor_type_to_unit)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:38:23 -06:00
68a4ebf601
fix: correct misclassified MikroTik voltage sensors
Fixes voltage sensors that were incorrectly classified as temperature
sensors due to MikroTik devices reporting wrong mtxrGaugeUnit values.

Problem:
- Sensors with names like "psu1-voltage" and "psu2-voltage" were
  classified as temperature sensors with divisor=1
- This caused voltage readings to display as 469V instead of 46.9V
- The RouterOS profile already has name-based override logic for new
  discoveries, but existing sensors needed fixing

Solution:
- Migration identifies sensors by:
  - OID pattern: 1.3.6.1.4.1.14988.1.1.3.100.1.3.%
  - Type mismatch: sensor_type = 'temperature' but name contains 'voltage'
  - Incorrect divisor: sensor_divisor = 1
- Updates sensor metadata: type, unit, divisor
- Corrects historical sensor_reading values by dividing by 10

Future discoveries are already protected by the name-based override
logic in lib/towerops/snmp/profiles/vendors/routeros.ex:620-630

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:30:26 -06:00
8158042220
fix: correct Mikrotik voltage sensor divisor from 1 to 10
Mikrotik/RouterOS voltage sensors were showing incorrect values (469.0
instead of 46.9) because existing sensors in the database have
sensor_divisor=1 instead of the correct value of 10.

The RouterOS profile code was fixed in a previous commit to set
divisor=10 for new sensors, but existing sensors need to be updated.

Migration changes:
- Updates sensor_divisor from 1 to 10 for Mikrotik voltage sensors
- Identifies Mikrotik sensors by OID prefix: 1.3.6.1.4.1.14988.1.1.3.100.1.3
- Divides all historical sensor_reading values by 10 to correct the data
- Both up and down migrations included for full reversibility

After this migration:
- Voltage will show as 46.9V instead of 469.0V
- Historical graphs will show correct voltage values
2026-01-25 12:11:48 -06:00
29593ac734
refactor: migrate from etcd to Oban for distributed job coordination
Replaces etcd-based distributed locking with Oban's PostgreSQL-backed job queue.
This simplifies the architecture by eliminating the need for a separate etcd cluster
while providing better reliability and observability.

Changes:
- Add Oban dependency and migration (oban_jobs table)
- Create DevicePollerCoordinator and DeviceMonitorCoordinator Oban workers
- Remove EtcdCoordinator and EtcdLock modules
- Update application supervisor to start Oban
- Configure Oban with pollers (50 workers) and monitors (50 workers) queues
- Remove etcd StatefulSet from Kubernetes manifests
- Update monitoring supervisor documentation

Benefits:
- Simpler architecture (no etcd cluster to manage)
- PostgreSQL-based (uses existing database)
- Built-in uniqueness prevents duplicate jobs cluster-wide
- Better observability with Oban Web UI
- Automatic job rescue on node crashes
- Easier local development (no etcd required)

What was removed:
- etcd StatefulSet (3 pods)
- EtcdCoordinator module (320 lines)
- EtcdLock module (158 lines)
- eetcd dependency

All 3,686 tests passing.
2026-01-24 16:12:27 -06:00
e6054129b2
remote agent/cloud improvements 2026-01-24 09:16:41 -06:00
f084e09ea1
add multiple cloud agents 2026-01-23 18:04:01 -06:00
80d1864700
mac discovery 2026-01-23 09:22:08 -06:00
7bd3b1f9ec
arp 2026-01-23 08:40:57 -06:00
f402dcb7af
fix mikrotik sensors 2026-01-22 18:07:20 -06:00
96fc488023
sanitize snmp data and fix some cpu things 2026-01-22 16:53:01 -06:00
17f4558702
implement timescaledb improvements 2026-01-22 13:24:14 -06:00
7656ac7212
import yamls 2026-01-21 14:30:04 -06:00
1fc066d95b
feat: add memory pool and storage discovery (Phase 1.5)
- Add snmp_memory_pools table and MemoryPool schema
- Add snmp_storage table and Storage schema
- Add discover_memory_pools/1 for HOST-RESOURCES-MIB RAM/swap
- Add discover_storage/1 for HOST-RESOURCES-MIB disk storage
- Add comprehensive tests for schema validation and discovery
- Completes Phase 1 of discovery improvements
2026-01-21 10:57:08 -06:00
45ddcdac80
feat: add physical inventory discovery (Phase 1.4)
- Create snmp_physical_entities table with migration
- Add PhysicalEntity schema with entity_class validation
- Support parent/child hierarchy via parent_entity_id
- Implement discover_physical_entities/1 in Base profile
- Discover chassis, modules, PSUs, fans from ENTITY-MIB
- Map entity class integers to string names
- Add 10 schema tests and 4 discovery tests
- Fix flaky AlertNotifier test with unique names and mailbox clearing
2026-01-21 10:46:27 -06:00
1cf6f327ea
feat: add IP address discovery (Phase 1.3)
- Create snmp_ip_addresses table with migration
- Add IpAddress schema with ip_type validation (ipv4/ipv6)
- Add prefix_length validation based on ip_type
- Implement discover_ip_addresses/1 in Base profile
- Extract IP addresses from IP-MIB ipAdEntTable
- Support multiple IPs per interface with subnet masks
- Add 12 schema tests and 4 discovery tests
2026-01-21 10:36:19 -06:00
579a7bac21
add VLAN schema, migration, and discovery 2026-01-21 10:31:21 -06:00
c3e26a44d6
add state sensor schema, migration, and discovery 2026-01-21 10:25:01 -06:00