https://github.com/zze0s/vnstat-sse
Expose vnstat over HTTP using SSE (server-sent-events) to send updates. Basic bundled HTMX webpage to view it.
https://github.com/zze0s/vnstat-sse
go golang htmx sse vnstat
Last synced: 5 months ago
JSON representation
Expose vnstat over HTTP using SSE (server-sent-events) to send updates. Basic bundled HTMX webpage to view it.
- Host: GitHub
- URL: https://github.com/zze0s/vnstat-sse
- Owner: zze0s
- Created: 2024-09-17T17:09:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-17T17:14:06.000Z (over 1 year ago)
- Last Synced: 2025-06-03T15:07:37.052Z (about 1 year ago)
- Topics: go, golang, htmx, sse, vnstat
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-vnstat
Expose vnstat live data over a SSE api.
## Setup
Requires Go 1.22.
Download dependencies
```bash
go mod download
```
Build binary. This outputs a binary to `dist/go-vnstat`. Make it executable `chmod +x` then you can run it with `./dist/go-vnstat`.
```bash
make build
```
## Usage
Setup a client that points to `http://ip:8200/events?stream=live-data` for json feed. `/events?stream=messages` contains html useful for HTMX SSE.