brainstate

OppsError404/luci-app-dashboard · source

Snapshot 0 · 2026-11-04T12:47:28Z · JavaScript · MIT

Content fingerprint4ad8faf7af0e29d86a2fa2394450c4f77109b8fc48ab3721e0a0d440a2cb7eac

GitHub description at capture

An OpenWrt LuCI realtime system monitoring dashboard, vnStat traffic backup manager, and adblock status control panel.

README at capture

# LuCI Realtime Dashboard

Real-time system monitoring dashboard and vnStat database backup manager for OpenWrt. Renders live charts and stats inside the LuCI web UI. No external services or build tools required.

**Official upstream repository for the OpenWrt luci-app-dashboard package.**

---

## Installation

### For OpenWrt v25.12 or newer (.apk)

```bash
apk update && \wget --no-check-certificate -O /tmp/luci-app-dashboard.apk "https://github.com/OppsError404/luci-app-dashboard/releases/download/v2.0.0-r5/luci-app-dashboard-2.0.0-r5.apk" && \
apk add --allow-untrusted /tmp/luci-app-dashboard.apk && \
rm -f /tmp/luci-app-dashboard.apk
```

### For OpenWrt v24.10.5 or older (.ipk)

```bash
opkg update && \wget --no-check-certificate -O /tmp/luci-app-dashboard.ipk "https://github.com/OppsError404/luci-app-dashboard/releases/download/v2.0.0-r5/luci-app-dashboard_2.0.0-r5.ipk" && \
opkg install /tmp/luci-app-dashboard.ipk && \
rm -f /tmp/luci-app-dashboard.ipk
```

## Uninstallation

### For OpenWrt v25.12 or newer (.apk)

```bash
apk del luci-app-dashboard
```

### For OpenWrt v24.10.5 or older (.ipk)

```bash
opkg remove luci-app-dashboard
```

## Features

### Dashboard

- WAN RX/TX live rates with rolling chart
- Internet ping status and RTT
- PPPoE / DHCP / Static WAN detection and uptime
- Public IP, ISP name, ASN (12h cache)
- CPU usage — overall + per-core bars + line chart
- CPU and Wi-Fi chip temperatures
- RAM arc gauge, bar, and sparkline chart
- System uptime
- vnStat daily and monthly traffic totals (optional)

### vnStat Backup

- Automated 12-hour scheduled backups to persistent flash storage
- Instant backup/restore via web UI or CLI
- Compressed gzip storage to minimize flash wear
- Persistent timestamp tracking across reboots
- Global CLI commands: `vnstat_backup` and `vnstat_restore`

---

## Usage

### Web Interface

Navigate to **Dashboard** in the LuCI menu.

### Service Commands

```bash
/etc/init.d/dashboard status                  # Show full service status
/etc/init.d/dashboard vnstat_enable           # Enable vnStat card
/etc/init.d/dashboard vnstat_disable          # Disable vnStat card
/etc/init.d/dashboard vnstat_backup_enable    # Enable scheduled 12h DB backup
/etc/init.d/dashboard vnstat_backup_disable   # Final backup then disable
/etc/init.d/dashboard vnstat_backup_fix       # Repair missing cron job
/etc/init.d/dashboard vnstat_backup           # Immediate backup
/etc/init.d/dashboard vnstat_restore          # Immediate restore
```

### Global CLI Shims

```bash
vnstat_backup   # Same as /etc/init.d/dashboard vnstat_backup
vnstat_restore  # Same as /etc/init.d/dashboard vnstat_restore
```

---

## Configuration

Edit `/etc/config/dashboard`:

```
config dashboard 'settings'
    option vnstat   '1'     # Show vnStat traffic card (0/1)
    option vnstat_db '0'    # Enable automatic vnStat DB backups (0/1)
    option multi_core '1'   # Manaually enable/disable per core graph (0/1)
```

Apply changes:

```bash
/etc/init.d/dashboard restart
```

---

## Dependencies

### Required

| Package | Required | Notes |
|---------|----------|-------|
| `luci-base` | Yes | LuCI framework |
| `lua` | Yes | Lua runtime |
| `luci-lib-nixio` | Yes | Nixio library for filesystem operations |
| `cgi-io` | Yes | CGI file upload helper |
| `libubus-lua` | Yes | ubus LuaAPI |
| `libuci-lua` | Yes | UCI configuration API |

### Optional

| Package | Required | Notes |
|---------|----------|-------|
| `vnstat2` | No | Enables traffic statistics |

### Frontend (CDN)

- Chart.js 3.x
- Font Awesome 6.5

---

## URLs

```
/cgi-bin/luci/admin/services/dashboard
/cgi-bin/luci/admin/services/vnstat_backup
/cgi-bin/luci/admin/status/dashboard          (JSON API)
/cgi-bin/luci/admin/status/dashboard/force    (force cache clear)
```

---

## Notes

- vnstatd must be running for traffic stats to accumulate.
- vnStat DB backup requires vnstat2 to be installed and running.
- All cache files live in /tmp and reset on reboot.
- Backup files stored in /etc/vnstat/backup/ persist across reboots.

---

## Screenshots

![OpenWrt LuCI Realtime Dashboard System Monitoring Interface](dashboard_screenshot.png)
![OpenWrt LuCI vnStat Backup Manager Plugin Panel](vnstat_backup.png)

---

### License

MIT License

---

## See Also
* [luci-app-client-monitor](https://github.com/OppsError404/luci-app-client-monitor) - Realtime per-client bandwidth usage and traffic monitor.