Update MIB directory configuration for embedded files
- Update config.exs to point to /app/priv/mibs in production - Update dev.exs to include priv/mibs root for standard MIBs - Remove obsolete :mib_dir (singular) config - MIB files are now part of the release and included in Docker image - Paths work in both development and production environments
This commit is contained in:
parent
b4f8b40b7f
commit
77d70b28b7
2 changed files with 15 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue