https://github.com/marekq/go-firewalla
Download device details, flowlogs and alarms from the Firewalla MSP API.
https://github.com/marekq/go-firewalla
firewalla firewalla-scripts golang
Last synced: 12 months ago
JSON representation
Download device details, flowlogs and alarms from the Firewalla MSP API.
- Host: GitHub
- URL: https://github.com/marekq/go-firewalla
- Owner: marekq
- License: mit
- Created: 2023-04-28T15:43:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-26T22:25:49.000Z (about 2 years ago)
- Last Synced: 2025-06-19T20:01:50.245Z (12 months ago)
- Topics: firewalla, firewalla-scripts, golang
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
go-firewalla
============
Download device details, flowlogs and alarms from the Firewalla MSP API. The results are stored to a local CSV file.
## Installation
- Edit the `config.json` file with your Firewalla MSP API key and URL:
```json
{
"token": "token",
"url": "https://.firewalla.net/v1/"
}
```
- Run `go build` to build the binary (`firewalla`)
- Run `chmod +x firewalla` to make the binary executable
- Now you can one of the following commands:
```bash
Usage of ./firewalla:
-debug
Debug mode
-help
Display help menu
-hours int
(Optional) Flowlog hours to retrieve (default 24)
-limit int
(Optional) Results limit (default 200)
-mode string
Mode to run the script (devices, alarms, flowlogs) (default "flowlogs")
```
## CLI Examples
```bash
# Get all devices (write to devices.csv)
$ firewalla -mode devices
# Get all alarms (write to alarms.csv)
$ firewalla -mode alarms
# Get all flowlogs for last X hours (default 24) (write to flowlogs/ folder)
$ firewalla -mode flowlogs
$ firewalla -mode flowlogs -hours 3
$ firewalla -mode flowlogs -hours 48 -debug
```