Grab the output from xmr-stak[-cpu|-gpu] http://localhost/api.json and pass to a MongoDB
Use MongoDB to generate reports
- https://nodejs.org/ (tested with 8.8.1)
- https://github.com/node-schedule/node-schedule
- https://github.com/request/request
Optional:
git clone https://github.com/dcolley/xmr-stak-log-mongodb [dirname]
cd [xmr-stak-log-mongodb|dirname]
npm install
edit the index.js
// API config
var api = {
proto: 'http',
ip: '192.168.1.107', // the host running xmr-stak
port: '8080', // from xmr-stak/config.txt
path: '/api.json',
};
// Mongo config
var m = {
proto: 'mongodb',
ip: '192.168.1.4', // the host running MongoDB
port: '27017', // MongoDB port
db: 'xmr-stak',
// username: '', // TODO add this to the db connection string...
// password: '',
};
node index.js
Also, you could run this with https://github.com/foreverjs/forever
Please clone the repo, add any improvements, and then submit a pull request.
GPL-3