Add per-interface capacity tracking with manual override and automatic detection from SNMP sensors. Includes capacity resolver with priority cascade (manual > sensor > if_speed), throughput calculation from interface stats, and site/organization-level capacity summaries. - Migration: add configured_capacity_bps and capacity_source to snmp_interfaces - Capacity.Resolver: multi-source capacity detection with vendor unit normalization - Capacity context: throughput calculation, utilization percentages, site/org summaries - Snmp context: set_manual_capacity/2 and clear_manual_capacity/1 functions
10 lines
241 B
Elixir
10 lines
241 B
Elixir
defmodule Towerops.Repo.Migrations.AddCapacityFieldsToInterfaces do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
alter table(:snmp_interfaces) do
|
|
add :configured_capacity_bps, :bigint
|
|
add :capacity_source, :string
|
|
end
|
|
end
|
|
end
|