ewbf's cuda miner collector for InfluxDB & Grafana
These instructions will get you a copy of the project up and running on your local machine for development, testing and purposes.
These things do you need to install the software:
Desktop computer with Ubuntu / Debian OS, or RASPBERRY PI 3 with Raspbian OS
Node.js® 8.11.3 - is a JavaScript runtime built on Chrome's V8 JavaScript engine.
InfluxDB 1.5.2 - the Time Series Database in the TICK Stack
Grafana 5.1.3 - the leading open source software for time series analytics
user@host:~$ sudo apt-get update && sudo apt-get upgrade -y
user@host:~$ sudo apt-get install -y curl git apt-transport-https
user@host:~$ sudo useradd --home-dir /home/collector --create-home --shell /bin/bash --system --user-group --groups sudo collector
user@host:~$ sudo passwd collector
Enter new UNIX password:
Retype new UNIX password:
user@host:~$ sudo su - collector
collector@host:~$ influx
Connected to http://localhost:8086 version 1.5.2
InfluxDB shell version: 1.5.2
> create database "ewbf-collect"
> show databases
name
----
_internal
ewbf-collect
> exit
collector@host:~$ sudo grafana-cli plugins install blackmirror1-singlestat-math-panel
collector@host:~$ sudo systemctl restart grafana-server
collector@host:~$ sudo service grafana-server restart
sample config file :
[common]
cuda_devices 0 1 2 3 4 5
intensity 64 64 64 64 64 64
templimit 83
pec 0
boff 0
eexit 1
tempunits c
log 2
logfile /applogs/miners/ewbf-btg.log
api 0.0.0.0:42000
algo 144_5
pers BgoldPoW
# main server
[server]
server btg.2miners.com
port 4040
user GLtZTKSEbhCjTGPmrXbgeaeBBrz6B97wJT
pass password
C:\ewbfminer> miner.exe --config miner.cfg
user@rig:/opt/ewbfminer$ ./miner --config miner.cfg
or without config file
C:\ewbfminer> miner --algo 144_5 --pers BgoldPoW --server btg.2miners.com --port 4040 --user GLtZTKSEbhCjTGPmrXbgeaeBBrz6B97wJT --api 0.0.0.0:42000
user@rig:/opt/ewbfminer$ ./miner --algo 144_5 --pers BgoldPoW --server btg.2miners.com --port 4040 --user GLtZTKSEbhCjTGPmrXbgeaeBBrz6B97wJT --api 0.0.0.0:42000
collector@host:~$ git clone https://github.com/miningtools/ewbf-collect.git
collector@host:~$ cd ewbf-collect/
collector@host:~/ewbf-collect/$ npm install
collector@host:~/ewbf-collect/$ cp ./config/hosts.config.sample.js ./config/hosts.config.js
hosts config file: config/hosts.config.js (need to edit before first run ewbf-collect)
...
{ name: 'rig1a', address: 'localhost', port: 42000 },
{ name: 'rig1b', address: '127.0.0.1', port: 42001 },
{ name: 'rig2', address: '10.236.6.200', port: 42000 },
...
daemon config file: config/daemon.config.js
...
user: "collector",
group: "collector",
...
InfluxDB config file: config/influx.config.js
...
influx.db = {
host:'localhost',
port:'8086',
name:'ewbf-collect'
}
...
collector@host:~/ewbf-collect/$ sudo su -
root@host:~$ cat <<'EOF' > /lib/systemd/system/ewbf-collect.service
[Unit]
Description=ewbf-collect is an open-source ewbf miner collector
Documentation=https://github.com/miningtools/ewbf-collect
After=network-online.target
[Service]
Type=forking
Environment=NODE_ENV=prod
WorkingDirectory=/home/collector/ewbf-collect/
ExecStart=/home/collector/ewbf-collect/ewbf-collect start
ExecStop=/home/collector/ewbf-collect/ewbf-collect stop
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ewbf-collect
[Install]
WantedBy=multi-user.target
Alias=ewbf-collect.service
EOF
root@host:~$ systemctl daemon-reload
root@host:~$ exit
collector@host:~$ sudo systemctl enable ewbf-collect
collector@host:~$ sudo systemctl start ewbf-collect
collector@host:~$ sudo systemctl status ewbf-collect
Login to Grafana with admin/admin
Go to Configuration / Data Sources
Click "Add data source" button
the next page will have to fill in some input fields
Name: ewbf-collect
Type: InfluxDB
Check in "Skip TLS Verification" checkbox
Database: ewbf-collect
then click Save & Test
Next Go to Create Dashboard / Import
The Grafana.com Dashboard id is 7530
click "Import" button
collector@host:~/ewbf-collect/$ export NODE_ENV=prod
collector@host:~/ewbf-collect/$ sudo ./ewbf-collect start
or
collector@host:~/ewbf-collect/$ sudo systemctl start ewbf-collect
collector@host:~/ewbf-collect/$ export NODE_ENV=test
collector@host:~/ewbf-collect/$ node index.js
collector@host:~/ewbf-collect/$ export NODE_ENV=dev
collector@host:~/ewbf-collect/$ node index.js
- v1.0.1.
- tsab - Initial work - MiningTools
See also the list of contributors who participated in this project.
This project is licensed under the GNU License - see the LICENSE.md file for details