Git Product home page Git Product logo

houseboat's Introduction

Description

Some services to run on a cron and track basic network perf over time. I'm convinced that comcast throttles me during the day but I don't have the data to back it up yet

The setup is pretty basic, a python script pushes metrics to influxdb, and granfa visualizes it

Dashboard image

Development

python3 -m venv ./env
source ./env/bin/activate
pip install -r requirements.txt
cd src
python3 main.py

Deployment

rsync --filter=':- .gitignore' $PWD/ some-host:/opt/houseboat/ -r --delete

# execute the rest of this on the target host
ssh some-host
cd /opt/houseboat
docker-compose -f docker/docker-compose.yml build collector 
docker-compose up -d

Create a script to wrap the collector runs with some logs

#!/usr/bin/env bash

echo "$(date): Running collector" >> ./collector.log
/usr/local/bin/docker-compose -f /opt/houseboat/docker/docker-compose.yml up collector
echo "$(date): Done running collector" >> ./collector.log
# create a cronjob to run the collector at some interval
*/7 * * * * /root/run-collector.sh

Appendix

Example speedtest cli out json:

{
    "type":"result",
    "timestamp":"2010-09-28T01:17:20Z",
    "ping": {
        "jitter": 5.5609999999999999,
        "latency": 18.079999999999998
    },
    "download": {
        "bandwidth": 5429538,
        "bytes": 64531544,
        "elapsed": 13517
    },
    "upload": {
        "bandwidth": 625648,
        "bytes": 6727972,
        "elapsed": 12316
    },
    "packetLoss":0,
    "isp":"ISP",
    "interface": {
        "internalIp": "10.10.10.10",
        "name":"eth0",
        "macAddr":"00:00:00:00:00:00",
        "isVpn":false,
        "externalIp":"8.8.8.8"
    },
    "server":{
        "id": 1,
        "name": "Foo Bar",
        "location": "Foo, BA",
        "country": "Discworld",
        "host":"sp1.acel.la",
        "port": 443,
        "ip":"8.8.8.8"
    },
    "result": {
        "id":"id",
        "url":"https://www.speedtest.net/result/c/id"
    }
}

houseboat's People

Contributors

ahulab avatar

Watchers

 avatar

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.