SwitchPulse is a lightweight, log-free telemetry agent designed for real-time observability of managed FortiSwitches through a FortiGate controller. It provides a clean, responsive interface for tracking FortiSwitch health, port status, and historical outages without the need for complex monitoring infrastructure.
- Real-Time Telemetry: Instant status updates for all managed FortiSwitches.
- Auto-Refresh: Configurable refresh intervals (5s - 300s) for continuous monitoring.
- Outage History: Persistent tracking of offline events, stored locally in your browser.
- Multi-User Configuration: Support for server-side defaults via
.envor system environment variables. - UI Overrides: Access multiple controller devices from a single instance with manual credential overrides.
- Port Details: Deep-dive into specific FortiSwitch port statuses, speeds, and POE budgets.
- Responsive Design: Elegant UI with native Dark Mode support.
- Data Export: Export your FortiSwitch inventory and status to CSV or JSON formats.
- Backend: Go (Standard Library, Zero-Dependency)
- Frontend: Vanilla HTML5, CSS3, ES6 Javascript
- Protocol: HTTPS/HTTP (Custom Telemetry Tunnel)
- Go: 1.18+ (if building from source)
- Controller Access: A valid API Key for the FortiGate controller.
- Network: The machine running SwitchPulse must have network access to the FortiGate management interface. (Tested version FortiOS 7.6.6)
-
Clone the Project:
git clone <repository_url> cd SwitchPulse
-
Configure Environment Variables: Create a
.env.localfile (recommended) or.envin the root directory:FORTIGATE_IP=192.168.1.99 FORTIGATE_API_KEY=your_secret_token
-
Run the Application:
go run main.go
The application will automatically attempt to open your default browser at the configured port (default:
http://127.0.0.1:8080).
| Variable | Description | Default |
|---|---|---|
FORTIGATE_IP |
The management IP of your FortiGate controller. | N/A |
FORTIGATE_API_KEY |
Your FortiOS API User token. | N/A |
PORT |
The local port to serve the UI. | 8080 |
The backend implements strict destination validation at the network socket layer (DialContext). Every request is resolved and verified before connection, preventing:
- DNS Rebinding: Hostnames cannot be swapped for internal IPs after validation.
- Service Discovery Protection: Prevents the agent from being used to scan internal metadata or loopback services.
- Configurable Scope: Use
ALLOW_LOCAL_NETWORK=true(default) to reach internal FortiGates, andALLOW_LOOPBACK=true(default: false) to reach services on the local host.
| Variable | Description | Default |
|---|---|---|
FORTIGATE_IP |
The management IP of your FortiGate controller. | N/A |
FORTIGATE_API_KEY |
Your FortiOS API User token. | N/A |
PORT |
The local port to serve the UI. | 8080 |
ALLOW_LOCAL_NETWORK |
Permit access to private RFC1918 subnets. | true |
ALLOW_LOOPBACK |
Permit access to 127.0.0.1 / localhost. | false |
- Security Verification: Attempt to set
Controller IPto127.0.0.1. The backend should return a403 Forbiddenwith asecurity violationmessage. - Server Configuration: Populated
.env.localand ensure the⚡ Server Defaults Activemessage appears in the UI. - Telemetry Verification: Click Load Switches and verify the table populates with your switch data.
- Outage Tracking: Briefly disconnect a switch and verify a red 🔴 pulse entry appears in the "Offline History".
- Export Check: Download CSV/JSON exports and verify all fields match the live UI data.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
(C) 2026 Zettaflop Team. See the LICENSE file for details.

