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:
parent
a63297069c
commit
d25f4c313b
34
README.md
34
README.md
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue