simple ping results collecting system using fping and ruby (sinatra, hamlit, sequel, clockwork)
- Install
fping(sudo apt install fping,brew install fping, etc.) git clone https://github.com/znz/simple-ping-resultscd simple-ping-resultsbundle install --path .bundle/vendor --without postgresbundle exec rake db:migrate DATABASE_URL=sqlite://development.dborrake db:migrate DATABASE_URL=sqlite://development.dbbundle exec irb -r irb/completion -r ./appandTarget.create(range: '192.168.1.x', min: 1, max: 254, group: 'LAN')and/orTarget.create(range: '192.168.x.1', min: 0, max: 255, group: 'LAN'), etc.range: '192.168.1.x', min: 1, max: 254means192.168.1.1-254range: '192.168.x.1', min: 0, max: 255means192.168.0.255.1
BASIC_AUTH_USERNAME=admin BASIC_AUTH_PASSWORD=admin bundle exec foreman startopen http://localhost:5000/
Import data of simple-ping-summary.
Example:
ruby import.rb 192.168.1.x 1 254 /path/to/data/192.168.1ruby import.rb 192.168.x.1 1 255 /path/to/data/192.168
- Install Dokku
dokku apps:create pingdokku config:set --no-restart ping TZ=Asia/Tokyodokku config:set --no-restart ping BASIC_AUTH_USERNAME=admin BASIC_AUTH_PASSWORD=admindokku config:set --no-restart ping PING_INTERVAL=600if you want to change ping interval (see clock.rb)sudo dokku plugin:install https://github.com/dokku/dokku-postgresdokku postgres:create ping_dbdokku postgres:link ping_db pingsudo dokku plugin:install https://github.com/F4-Group/dokku-aptgit push [email protected]:ping masterdokku ps:scale ping clock=1