Update README.md
This commit is contained in:
parent
d25f4c313b
commit
037fc34d56
20
README.md
20
README.md
|
@ -2,23 +2,23 @@
|
||||||
|
|
||||||
Docker images are available on [Docker Hub](https://hub.docker.com/r/certusone/near_exporter).
|
Docker images are available on [Docker Hub](https://hub.docker.com/r/certusone/near_exporter).
|
||||||
|
|
||||||
Go is required to build the binary.
|
Go >= 1.14 is required to build the binary.
|
||||||
|
|
||||||
|
### How to build
|
||||||
|
|
||||||
***Build the binary:***
|
|
||||||
```
|
```
|
||||||
go build github.com/certusone/near_exporter/cmd/near_exporter
|
go build github.com/certusone/near_exporter/cmd/near_exporter
|
||||||
```
|
```
|
||||||
|
|
||||||
***Systemd service example***
|
### systemd service example
|
||||||
|
|
||||||
```
|
```
|
||||||
cp near_exporter /usr/local/bin
|
cp near_exporter /usr/local/bin
|
||||||
|
|
||||||
vi /etc/systemd/system/near-exporter.service
|
cat <<EOF > /etc/systemd/system/near-exporter.service
|
||||||
|
|
||||||
#Add this content to the file:
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=near-exporter
|
Description=Certus One near_exporter
|
||||||
|
Documentation=https://github.com/certusone/near_exporter
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -29,8 +29,12 @@ RestartSec=10s
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable and start the service:
|
||||||
|
|
||||||
|
```
|
||||||
systemctl enable --now near-exporter
|
systemctl enable --now near-exporter
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue