See #134
-
Download latest binary from the Releases page
-
chmod +x fronius-exporter && mv fronius-exporter /usr/local/bin/
Comes with systemd unit file.
-
Download latest package from the Releases page
-
sudo dpkg -i fronius-exporter_linux_amd64.deb(Debian/Ubuntu) -
sudo rpm -i fronius-exporter_linux_amd64.rpm(CentOS) -
sudo systemctl daemon-reload -
Edit the settings in
/etc/default/fronius-exporter -
sudo systemctl enable fronius-exporter -
sudo systemctl restart fronius-exporter
With fronius-exporter
-
helm repo add ccremer https://ccremer.github.io/charts -
helm install fronius ccremer/fronius-exporter
fronius-exporter --symo.url http://symo.ip.or.hostnameUpon each call to /metrics, the exporter will do a GET request on the given URL, and translate the JSON response to Prometheus metrics format.
fronius-exporter can be configured with CLI flags.
Call the binary with --help to get a list of options.
|
💡
|
All flags are also configurable with Environment variables.
Following calls are equivalent
fronius-exporter --symo.url http://... SYMO__URL=http://... fronius-exporter |
See Example
Run make help to see available goals
Platform related builds are handled by goreleaser:
export GOOS=linux export GOARCH=arm64 export IMAGE_REPOSITORY=ccremer/fronius-exporter goreleaser build --snapshot --clean --single-target
On the other hand you can also use the actual make build in combination with docker buildx
export GOOS=linux export GOARCH=arm64 export IMAGE_REPOSITORY=ccremer/fronius-exporter make build # you now have a binary with arm64 arch docker buildx build --platform linux/arm64 -t $IMAGE_REPOSITORY --push .
If you don’t have a Symo device at hand, you can fake one:
# In its own terminal
python3 -m http.server 8081
# In another terminal
go run . -v --symo.url http://localhost:8081/pkg/fronius/testdata/example_1.json
# Yet another terminal or browser
curl -L http://localhost:8080/metrics