Node.js 6+
- Token from ScreepsPl.us
- Screeps Login info
- Node + NPM
Bonzaiferroni has written a nice guide for setting up on the Google Compute Engine free tier, check it out here
npm install -g screepsplus-agent
screepsplus-agent
- Download
- Configure with config.js
npm install
node app.js
To use with docker, just do the following:
docker build -t screepsplus-agent .
docker run -d -v $(pwd):/config/ --restart=always --name screepsplus-agent screepsplus-agent
A docker-compose.yml is included.
It is now possible to use the console to output stats, just set method to 'console' in config.js
and use console.log('STATS;'+formattedStats)
For this to work, type based format is REQUIRED
NOTE: you should use ';'
instead of newLine ("\n"
) as a delimiter
The usual grafana data format
{
rooms: {
W0N0:{
level:2
}
}
}
This is a more advanced system that allows you to send raw stats pre-formatted. There should always be a 3 line header,
type
tick
time
followed by the raw stat data
For ScreepsPl.us, type can be one of 3 values: 'text/grafana' 'text/influxdb' 'application/json'
Where application/json
inserts into graphite.
1 stat per line: stat value
EX: room.W0N0.level 5
1 stat per line: stat[,tag1=value,tag2=value,...] key=value[,key=value,...]
EX: room,name=W0N0 level=5,energy=300,energyCapacity=300
NOTE: as of this writing this README, influxdb support is enabled, but cannot be accessed without requesting influxdb credentials