https://github.com/goliatone/go-rpi-agent
Golang RPi agent, advertise over MDNS and expose service for stats
https://github.com/goliatone/go-rpi-agent
Last synced: 2 months ago
JSON representation
Golang RPi agent, advertise over MDNS and expose service for stats
- Host: GitHub
- URL: https://github.com/goliatone/go-rpi-agent
- Owner: goliatone
- Created: 2019-03-24T21:03:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-19T18:16:13.000Z (over 3 years ago)
- Last Synced: 2025-02-13T19:18:20.513Z (4 months ago)
- Language: Go
- Size: 15 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
To install the service run the `taskfile`:
```
$ run service:install
```Where:
* USER: RPi user, e.g. `pi`
* HOST: RPi host, e.g. `raspberrypi.local`
* UUID: RPi instance ID, e.g. `20d520b5-1f94-412e-9dd6-d6b11aa89b06`## Metrics
Refactoring:
1. Use a template for output
2. Collect metrics/data using a plugin architecture### Template output
- [ ] Add flag with path to template
- [ ] Create default template### Data Collection
- [ ] Add flag to directory with plugins
- [ ] Define plugin interface
- [ ] Define typedef for:
- [ ] Measurement
- [ ] Store```go
type Meassurement struct {
Key string
Value interface{}
Time int64
}type Store interface {
func set(m Meassurement)
func serialize()
}
```TODO:
- [ ] Dynamically create service systemd to use right user
- [ ] Take URL endpoint from flags
- [ ] Refactor to use external template to configure POST payload
- [ ] Add flag to run timer for POST payload
- [ ] Refactor so we collect data dynamically:
- [ ] Each function should take output map and add its result to it, e.g.: getMac(&out)
- [ ] These collectors should be a plugin interface to be loaded- [ ] Is there a way to configure refresh rate of MDNS client?
- [ ] Create Prometheus endpoint for [metrics](https://prometheus.io/docs/concepts/metric_types/)
- [ ] Fluentbit [fluentd agent](https://fluentbit.io/)
- [ ] arm info [here](https://fluentbit.io/documentation/0.12/installation/raspberry_pi.html)
- [ ] Add `ExecStop` and `ExecReload` to rpi service.