Giter VIP home page Giter VIP logo

blissey's Introduction

Blissey

Process controller/golbat data for workers, pokemon, quest, account, drago log into seperate stats tables.
Processing is done on interval 15/60/1440/10080 minutes and can be displayed by pre-defined grafana templates.

1 Prerequisites

  • tested on: mariadb 10.6
  • add Golbat/geojson/geofence.json or setup Koji api, containing your mon scan fences. Golbat will use these fences to write raw area mon stats to db.
  • enable stats in controller config so it writes raw worker stats
  • enable save logs in controller config is you want them processed
  • mysql and jq installed

2 Setup

  • clone Blissey, git clone https://github.com/UnownHash/Blissey.git && cd Blissey
  • create stats db and user (user needs to have access to stats/controller/golbat db)
  • copy and fill out config, cp default_files/config.ini.example config.ini
  • execute setting.run
  • add content of crontab.txt to your cron

2.1 Geofences

Blissey needs quest and mon fences in order to aggregate data. 2 ways of doing this:
1 Use Koji

  • set config.ini accordingly
  • grant sql user access to koji db
  • project_golbat, this project should contain your mon fences. Ideally this is same project as used for 2nd point in prerequisites to ensure alligment.
  • project_controller, this project should contain your quest fences. Again to assure alligment your controller(Dragonite) project would be a logical choice. In case all area quest/mon fences are identical both can point to the same Koji project.

2 Manually add them to Blissey table geofences
add quest and mon area fences to table geofences and execute settings.run once more to populate columns `st` and `st_lonlat`
insert ignore into geofences (area,fence,type,coords) values
('Newyork','Newyork_centre','mon','lat1 lon1,lat2 lon2,lat3 lon3,lat1 lon1');

insert ignore into geofences (area,fence,type,coords) values
('Newyork','Newyork_south','mon','lat1 lon1,lat2 lon2,lat3 lon3,lat1 lon1');

insert ignore into geofences (area,type,coords) values
('Newyork','quest','lat1 lon1,lat2 lon2,lat3 lon3,lat1 lon1');

- column fence is only used in case you use subfences for an area(town), will default to area when not included
- first and last coordinate must be the same for column coords
- after changing or adding fences always execute setting.run to populate column st

Note 1: grafana templates will group before first "_" meaning for instance in the example above when looking at stats for area Newyork without specifying a fence the 2 mon areas will be combined

3 Grafana

4 Updates

  • depending on changes but to be safe, pull+execute settings.run+adjust config.ini when needed+update crontab
  • replace changed grafana templates


A logs folder will be created in Blissey, any errors during execution are printed before the actual logline

blissey's People

Contributors

dkmur avatar fabio1988 avatar feigei avatar astu04 avatar thejoshgriffith avatar mkllrtxn avatar unseenmagik avatar timxl73 avatar darthbutcher avatar kamieniarz avatar

Stargazers

IdkxdAsf avatar  avatar João Chung avatar Arnold avatar

Watchers

Chris Behrens avatar James Berry avatar RaizeTheLimit avatar  avatar

blissey's Issues

Name mismatch in default_files when no golbat_host

extra s in setting.run . procedures instead of procedure

Blissey/settings.run

Lines 35 to 36 in 328a10a

if [[ -z $golbat_host ]] ;then
cp $folder/default_files/procedures.sql.default $folder/procedures.sql

...
Creating required procedures
cp: cannot stat '/home/user/Blissey/default_files/procedures.sql.default': No such file or directory
sed: can't read /home/user/Blissey/procedures.sql: No such file or directory
sed: can't read /home/user/Blissey/procedures.sql: No such file or directory
sed: can't read /home/user/Blissey/procedures.sql: No such file or directory
./settings.run: line 54: /home/user/Blissey/procedures.sql: No such file or directory
...

https://github.com/UnownHash/Blissey/blob/328a10a2045ed5d2637605cf204e428387175e05/default_files/procedure.sql.default

Check for installation of `jq` and `mysql` in settings.run

An install onto a clean Ubuntu server instance threw errors in the log as

./5_dragonitelog.sh: line 89: jq: command not found
./5_dragonitelog.sh: line 90: jq: command not found
./5_dragonitelog.sh: line 91: jq: command not found
./5_invasion.sh: line 30: jq: command not found
./5_invasion.sh: line 35: jq: command not found
./5_invasion.sh: line 36: jq: command not found
./5_invasion.sh: line 37: jq: command not found
./5_invasion.sh: line 40: jq: command not found
./5_invasion.sh: line 46: jq: command not found
./5_invasion.sh: line 47: jq: command not found
./5_invasion.sh: line 50: jq: command not found
./5_invasion.sh: line 56: jq: command not found
./5_invasion.sh: line 57: jq: command not found

As well as

./5.sh: line 17: mysql: command not found

As per recommendation of @dkmur - settings.run should check for the presence of jq and mysql at startup, as well as probably adding both to the README as a requirement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.