Monitoring Latest Block and the difference between Bitcoin Block Number and LatestBlock
Download bitcoin core binaries
wget https://bitcoin.org/bin/bitcoin-core-0.16.0/test.rc3/bitcoin-0.16.0rc3-x86_64-linux-gnu.tar.gz
Extract bitcoin core
tar xzf bitcoin-0.16.0rc3-x86_64-linux-gnu.tar.gz
Install bitcoin core
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.16.0/bin/*
Start bitcoin core
bitcoind -daemon
Download InfluxDB
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.4.0_amd64.deb
Install InfluxDB
sudo dpkg -i influxdb_1.4.0_amd64.deb
Start InfluxDB
sudo systemctl start influxdb
Verify that InfluxDB is Running
Using the SHOW DATABASES curl command, verify that InfluxDB is up and running:
curl "http://localhost:8086/query?q=show+databases"
If InfluxDB is running, you should see an object that contains the _internal database:
{"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["_internal"]]}]}]}
- Install requirements: Run
pip install -r requirements.txt
on the working directory (you almost certainly want to do this in a virtualenv).
Create Logs directory by running mkdir logs
in working directory.
Set the following environment variables if configured else DO NOT.
export RPC_HOST=<host(localhost)>
export RPC_PORT=<port(8332)>
export RPC_USER=<user(root)>
export RPC_PASSWORD=<password>
export INFLUXDB_HOST=<host(localhost)>
export PORT=<port(8086)>
export DATABASE_NAME=<dbname>
export CALL_TIMEOUT=<timeout(600)>
From the working directory, run python main.py
.