defmodule ToweropsWeb.HelpLive.Index do @moduledoc false use ToweropsWeb, :live_view alias Towerops.Accounts alias Towerops.Accounts.Scope alias Towerops.Organizations @impl true def mount(_params, session, socket) do # Check if user is logged in via session current_user = get_current_user(socket, session) is_authenticated = !is_nil(current_user) # Load user's default organization if authenticated current_organization = if current_user do case Organizations.list_user_organizations(current_user.id) do [first_org | _] -> first_org [] -> nil end end # Build current_scope if authenticated current_scope = if current_user do current_user |> Scope.for_user() |> Scope.put_organization(current_organization) end socket = socket |> assign(:page_title, "Help") |> assign(:current_user, current_user) |> assign(:is_authenticated, is_authenticated) |> assign(:current_scope, current_scope) |> assign(:timezone, if(current_user, do: current_user.timezone, else: "UTC")) |> assign(:generated_password, nil) |> assign(:password_generating, false) # Generate initial password if connected?(socket) do send(self(), :fetch_random_password) end {:ok, socket} end @impl true def handle_params(params, _url, socket) do section = Map.get(params, "section", "about") socket = socket |> assign(:active_section, section) |> assign(:generated_password, nil) |> assign(:password_generating, false) {:noreply, socket} end @impl true def handle_event("generate_password", _params, socket) do socket = assign(socket, :password_generating, true) send(self(), :fetch_random_password) {:noreply, socket} end @impl true def handle_info(:fetch_random_password, socket) do case generate_random_password() do {:ok, password} -> {:noreply, socket |> assign(:generated_password, password) |> assign(:password_generating, false) |> put_flash(:info, "Password generated successfully from random.org")} {:error, reason} -> {:noreply, socket |> assign(:password_generating, false) |> put_flash(:error, "Failed to generate password: #{reason}")} end end defp generate_random_password do # Generate a 24-character truly random password from random.org # Format: uppercase, lowercase, and digits url = "https://www.random.org/strings/?num=1&len=24&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new" case Req.get(url) do {:ok, %{status: 200, body: body}} -> password = String.trim(body) {:ok, password} {:ok, %{status: status}} -> {:error, "random.org returned status #{status}"} {:error, error} -> {:error, Exception.message(error)} end end defp get_current_user(socket, session) do # Try to get current_user from socket assigns (if already set by on_mount) with nil <- Map.get(socket.assigns, :current_user), token when not is_nil(token) <- session["user_token"], {user, _authenticated_at} <- Accounts.get_user_by_session_token(token) do user else %Towerops.Accounts.User{} = user -> user _ -> nil end end slot :inner_block, required: true defp code(assigns) do ~H""" {render_slot(@inner_block)} """ end attr :active_section, :string, required: true attr :generated_password, :string, default: nil attr :password_generating, :boolean, default: false defp help_content(assigns) do ~H"""
Learn how to use Towerops to monitor your network infrastructure
Towerops is a modern network monitoring and management platform designed to provide comprehensive visibility into your network infrastructure. It came out of a need to simplify network monitoring and alerting while running a wireless ISP.
Our promise to you:
Think of Towerops as combining the best of LibreNMS, Icinga2/Nagios, and PagerDuty into a single, unified platform. You get deep network device monitoring with SNMP auto-discovery, flexible health checks and alerting, and intelligent incident management—all with a modern interface that makes complex monitoring workflows simple and accessible.
Towerops is not and has no plans to be a replacement for a full WISP/network billing system.
Like LibreNMS, discover and monitor network devices via SNMP with support for multi-vendor equipment, interface statistics, and topology mapping.
Like Icinga2/Nagios, configure flexible monitoring checks with customizable thresholds and alert conditions for any metric or device state.
Like PagerDuty, manage incidents with intelligent alerting, escalation policies, and notification routing to keep your team informed.
Ready to get started? Check out the <.link patch={~p"/help?section=getting-started"} class="underline hover:text-blue-900 dark:hover:text-blue-200" > Getting Started guide to begin monitoring your network infrastructure.
Towerops is a network monitoring platform that helps you keep track of your network devices, monitor their health, and get alerts when issues occur.
Sites represent physical or logical locations where your network devices are located. Start by creating a site for your office, data center, or any location where you have equipment.
Navigate to <.code>Sites → <.code>Add Site
Add network devices like routers, switches, access points, or servers. You'll need the device's IP address or hostname, and SNMP community string (for SNMP-enabled devices).
Navigate to <.code>Devices → <.code>Add Device
Click on any device to view real-time metrics including CPU usage, memory, temperature, interface traffic, and more. Explore the different tabs to see network topology, port status, and historical performance data.
For devices behind firewalls or in remote locations, you can deploy a remote poller to monitor devices locally without exposing them to the internet. See the <.link patch={~p"/help?section=agents"} class="underline hover:text-blue-900 dark:hover:text-blue-200" > Remote Pollers section for more information.
Sites are an optional organizational feature that lets you group devices by physical or logical locations such as offices, datacenters, customer locations, or network zones. Sites are disabled by default to keep things simple for single-location deployments.
Consider enabling sites if you:
You can skip enabling sites if you:
Sites are optional and disabled by default. You can start without sites and enable them later if your needs change. When sites are disabled, all devices belong directly to your organization.
When sites are enabled, devices can be organized into sites, and credentials (SNMP communities, usernames, passwords) can be set at three levels:
Default credentials that apply to all devices across all sites in your organization.
Override organization defaults for all devices at a specific site. Useful when different locations have different network configurations.
Override organization or site credentials for a specific device. Useful for devices with unique configurations.
Go to <.code>Settings → <.code>Organization and scroll to the "Site Organization" section.
Check the box for "Use sites to organize devices" and save your settings.
Navigate to <.code>Sites → <.code>Add Site to create your first site. Give it a descriptive name like "Main Office" or "Dallas Datacenter".
When creating or editing devices, you can now assign them to specific sites. The site selector will appear in the device form.
If you disable sites after enabling them, all devices will be removed from their sites and assigned directly to the organization. Site assignments will be lost, but devices will remain in your organization and continue to be monitored.
If you have publicly reachable devices, they will be automatically polled from one of our cloud pollers unless overridden by your settings. Our cloud infrastructure monitors your devices without requiring any additional setup or agent installation.
| Location | IPv4 Address | IPv6 Address |
|---|---|---|
| DFW (Dallas-Fort Worth) | 144.202.64.79 | 2001:19f0:6401:0af2:5400:05ff:fee7:1bfb |
If your devices are behind a firewall, make sure to allow SNMP traffic (UDP port 161) and ICMP (for ping monitoring) from these IP addresses. For devices not accessible from the public internet, consider using a <.link patch={~p"/help?section=agents"} class="underline hover:text-blue-900 dark:hover:text-blue-200" > Remote Poller instead.
Remote pollers allow you to monitor devices that are not accessible from the public internet, such as devices behind firewalls, in private networks, or at remote locations. A remote poller runs on your network and securely communicates with Towerops to poll your devices locally.
Remote pollers can run on any system that supports Docker Compose, including:
Minimum requirements: 1 CPU core, 512 MB RAM, and network access to your devices
Navigate to the <.code>Agents page in Towerops and create a new agent token. This token authenticates your remote poller with the Towerops platform.
On the Agents page, add a new remote agent. Copy the <.code>docker-compose.yml file contents from the agent details, which includes your authentication token pre-configured.
Transfer the <.code>docker-compose.yml file to your server and run:
The remote poller will start automatically and connect to Towerops.
You can assign devices to your remote poller in several ways:
Devices assigned to a remote poller will be monitored from your local network instead of from the cloud.
Remote pollers use secure WebSocket connections to communicate with Towerops. Your agent token is encrypted and should be kept confidential. The remote poller only needs outbound HTTPS access (port 443) to connect to Towerops - no inbound ports need to be opened on your firewall.
You can view the status of your remote pollers on the Agents page. The page shows:
If a remote poller goes offline, devices assigned to it will not be monitored until the poller comes back online. Consider setting up monitoring alerts for your remote pollers to be notified if they disconnect.
Towerops provides powerful visualization capabilities for all monitored metrics. Every sensor, interface, and metric can be viewed as a time-series graph with multiple time ranges and a real-time live polling mode for instant feedback.
Graphs are available throughout Towerops wherever metrics are displayed:
All graphs support multiple time ranges for analyzing trends at different scales:
Recent activity with high detail
Half-day trends and patterns
Business day overview
Full day of activity
Weekly trends and patterns
Monthly overview and capacity planning
Live mode provides real-time sensor monitoring with data updating every second. This is perfect for:
Navigate to any device and click on a metric graph (CPU, Memory, Temperature, Traffic, etc.)
The Live button has a distinctive green gradient style and will pulse when active
The graph will start updating every second with fresh data. A pulsing green indicator shows that live polling is active.
Click any other time range button to stop live polling and view historical data
Real-time CPU load and utilization
RAM utilization percentage
Device and component temperatures
Power supply voltages
Disk usage and capacity
Sessions, connections, and counts
Live mode is currently only available for sensor metrics (CPU, memory, temperature, etc.). Interface traffic graphs use historical data only, as traffic calculations require comparing multiple SNMP polls over time.
When viewing aggregate metrics (like "Temperature" for all sensors), the graph automatically displays all sensors of that type with different colors for easy comparison.
Historical graphs (non-live) display the maximum and minimum values for the selected time range at the bottom of the chart for quick reference.
Interface traffic graphs show outbound traffic as positive values (above zero) and inbound traffic as negative values (below zero) for easy visualization of bidirectional flow.
Traffic graphs automatically scale units (bps, Kbps, Mbps, Gbps) based on the data range for optimal readability. Hover over data points to see exact values.
Live polling makes direct SNMP requests every second. While this provides instant feedback, keeping many live graphs open simultaneously may impact device performance. Use live mode for troubleshooting and testing, then switch back to historical ranges for routine monitoring.
Towerops supports read-only monitoring of MikroTik RouterOS devices via SSH. In addition to SNMP polling, SSH access allows Towerops to retrieve detailed system information and create configuration backups of your MikroTik devices for disaster recovery and audit purposes.
Towerops currently operates in read-only mode for MikroTik devices. Configuration changes, reboots, and other administrative actions are not supported. This ensures your device configurations remain unchanged by monitoring operations.
Both SNMP polling and SSH connections to MikroTik devices can be performed from either Towerops cloud infrastructure or your remote poller (agent). For publicly accessible devices, cloud polling is the simplest option. For devices on private networks or when you prefer to keep SSH credentials on your local network, deploy a remote poller. The device assignment determines which poller handles both SNMP and SSH operations.
For security purposes, it is strongly recommended to create a dedicated read-only user account for Towerops rather than using an administrator account. This follows the principle of least privilege and minimizes potential security risks. Even though Towerops only performs read-only operations, limiting the account permissions provides defense in depth.
Connect to your MikroTik device via SSH or terminal and execute the following commands to create a read-only user named <.code>towerops:
Step 1: Create a new user group with read-only permissions
/user group add name=readonly policy=ssh,read,test,api
Step 2: Create the monitoring user with a strong password
/user add name=towerops password={if @generated_password,
do: @generated_password,
else: "YOUR_STRONG_PASSWORD"} group=readonly
<%= if @generated_password do %>
<% end %>
⚠️ This truly random password from random.org will only be shown once!
<% end %>Step 3: Verify the user was created successfully
/user print detail where name=towerops
The <.code>readonly group includes the following permissions. Note that while these permissions are granted to the user account, Towerops only performs read operations and does not make any configuration changes:
| Permission | Description |
|---|---|
| ssh | Allow SSH access to the device |
| read | Allow viewing configuration and status (read-only) |
| test | Allow executing diagnostic commands (ping, traceroute, etc.) |
| api | Allow API access for automated monitoring |
After creating the read-only user, configure SSH credentials in Towerops:
Navigate to <.code>Settings → <.code>Organization to set default SSH credentials for all MikroTik devices in your organization.
Navigate to <.code>Sites → select a site → <.code>Edit to override credentials for all devices at a specific location.
When editing a MikroTik device, you can specify unique SSH credentials that override organization and site defaults.
The requested help section could not be found.