From d25f4c313b9c47114df2d30a69942b4b1f9959dc Mon Sep 17 00:00:00 2001 From: mabalaru Date: Sun, 14 Feb 2021 15:53:23 +0200 Subject: [PATCH] Added extra information to README (#2) Added a short guide on how to install the near_exporter service and how to build the binary. --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index ce365bb..b029ee0 100644 --- a/README.md +++ b/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