Added extra information to README (#2)

Added a short guide on how to install the near_exporter service and how to build the binary.
This commit is contained in:
mabalaru 2021-02-14 15:53:23 +02:00 committed by GitHub
parent a63297069c
commit d25f4c313b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,37 @@
# near_exporter
Docker images are available on [Docker Hub](https://hub.docker.com/r/certusone/near_exporter).
Go is required to build the binary.
***Build the binary:***
```
go build github.com/certusone/near_exporter/cmd/near_exporter
```
***Systemd service example***
```
cp near_exporter /usr/local/bin
vi /etc/systemd/system/near-exporter.service
#Add this content to the file:
[Unit]
Description=near-exporter
After=network.target
[Service]
Environment="NEAR_RPC_ADDR=http://127.0.0.1:3030"
ExecStart=/usr/local/bin/near_exporter
Restart=always
RestartSec=10s
[Install]
WantedBy=multi-user.target
systemctl enable --now near-exporter
```
Exporter will be available at http://localhost:8080/metrics