diff --git a/config/config.exs b/config/config.exs index 9dee5d01..ee5935ac 100644 --- a/config/config.exs +++ b/config/config.exs @@ -88,6 +88,17 @@ config :towerops, ToweropsWeb.Endpoint, pubsub_server: Towerops.PubSub, live_view: [signing_salt: "Uh1ABfdI"] +# SNMP MIB directories for production (in Docker image) +# MIB files are included in the release at /app/priv/mibs +# Override in dev.exs for local development paths +config :towerops, :mib_dirs, [ + "/app/priv/mibs", + "/app/priv/mibs/mikrotik", + "/app/priv/mibs/cisco", + "/app/priv/mibs/net-snmp", + "/usr/share/snmp/mibs" +] + config :towerops, :scopes, user: [ default: true, @@ -104,8 +115,7 @@ config :towerops, :scopes, # Agent Docker Image # Override this in runtime.exs or environment-specific config config :towerops, - agent_docker_image: "gmcintire/towerops-agent:main", - mib_dir: "/app/mibs" + agent_docker_image: "gmcintire/towerops-agent:main" # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/config/dev.exs b/config/dev.exs index 584efeac..3a6e74b4 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -99,10 +99,12 @@ config :towerops, :env, :dev # Point to local priv/mibs subdirectories where MIB files are stored # Note: The root mibs/ directory only contains symlinks to LibreNMS repo config :towerops, :mib_dirs, [ + # Standard MIBs in priv/mibs root + Path.join([File.cwd!(), "priv", "mibs"]), + # Vendor-specific MIB directories Path.join([File.cwd!(), "priv", "mibs", "mikrotik"]), Path.join([File.cwd!(), "priv", "mibs", "cisco"]), Path.join([File.cwd!(), "priv", "mibs", "net-snmp"]), - Path.join([File.cwd!(), "priv", "mibs", "standard"]), # System MIBs as fallback "/usr/share/snmp/mibs" ]