diff --git a/README.md b/README.md index c75a950..33127c0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The `zcashd_exporter` will poll a zcashd node's rpc endpoint, retreive data, then preent it for prometheus to scrape. -## Getting started +## Getting started locally ``` go get -v github.com/zcash-hackworks/zcashd_exporter @@ -10,3 +10,74 @@ go install github.com/zcash-hackworks/zcashd_exporter $GOPATH/bin/zcashd_exporter --help ``` +## Getting Started With docker-compose + +#### Create zcashd direcotries + +Decide where you want to store (or refence existing ) zcashd data. + +For example, create 2 new directories: + +``` +sudo mkdir -p /srv/zcashd/.zcash +sudo mkdir -p /srv/zcashd/.zcash-params +``` + +Make uid `2001` owner of the directories. This is the uid of user `zcashd` runs as. + +``` +sudo chown -R 2001 /srv/zcashd/.zcash +sudo chown -R 2001 /srv/zcashd/.zcash-params +``` + +#### Create .env from .env.exmaple + +``` +cp .env.exmaple .env +``` + +Edit `.env` if you have any specific changes. + +#### Start docker-compose + +Start with +``` +docker-compose up -d +``` + +Check that everything started +``` +$ docker-compose ps + Name Command State Ports +------------------------------------------------------------------------------------------------------------------------------ +zcashdexporter_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp +zcashdexporter_prometheus_1 /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcp +zcashdexporter_zcashd_1 /entrypoint.sh Up 0.0.0.0:18232->18232/tcp, 0.0.0.0:28332->28332/tcp +zcashdexporter_zcashd_exporter_1 zcashd_exporter --rpc.host ... Up 0.0.0.0:9100->9100/tcp +``` + +### Check status + +zcashd +``` +docker logs zcashdexporter_zcashd_1 +``` + +zcashd_exporter +``` +docker logs zcashdexporter_zcashd_exporter_1 +``` + +If that's looking good, check `prometheus` for metric collection + +http://localhost:9090/targets + +![Prometheus Targets](docs/images/prometheus_targets.png) + +If that looks good too, start querying + +http://localhost:9090/graph + +Start typing and metric names will auto-suggest + +![Prometheus Metrics](docs/images/prometheus_metrics.png) \ No newline at end of file diff --git a/docs/images/prometheus_metrics.png b/docs/images/prometheus_metrics.png new file mode 100644 index 0000000..cd86c7d Binary files /dev/null and b/docs/images/prometheus_metrics.png differ diff --git a/docs/images/prometheus_targets.png b/docs/images/prometheus_targets.png new file mode 100644 index 0000000..5824a59 Binary files /dev/null and b/docs/images/prometheus_targets.png differ