All Projects → cuducos → My Internet Speed

cuducos / My Internet Speed

Licence: gpl-3.0
🛎️ Monitor the speed your ISP is delivering

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to My Internet Speed

Cluster Monitoring
Cluster monitoring stack for clusters based on Prometheus Operator
Stars: ✭ 453 (+283.9%)
Mutual labels:  hacktoberfest, monitoring
Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+25069.49%)
Mutual labels:  hacktoberfest, monitoring
Opennms
Enterprise-Grade Open-Source Network Management Platform
Stars: ✭ 568 (+381.36%)
Mutual labels:  hacktoberfest, monitoring
Guider
Performance Analyzer
Stars: ✭ 393 (+233.05%)
Mutual labels:  hacktoberfest, monitoring
Kmon
Linux Kernel Manager and Activity Monitor 🐧💻
Stars: ✭ 1,142 (+867.8%)
Mutual labels:  hacktoberfest, monitoring
Alertmanager
Prometheus Alertmanager
Stars: ✭ 4,574 (+3776.27%)
Mutual labels:  hacktoberfest, monitoring
Kuberhealthy
A Kubernetes operator for running synthetic checks as pods. Works great with Prometheus!
Stars: ✭ 920 (+679.66%)
Mutual labels:  hacktoberfest, monitoring
Graphite exporter
Server that accepts metrics via the Graphite protocol and exports them as Prometheus metrics
Stars: ✭ 217 (+83.9%)
Mutual labels:  hacktoberfest, monitoring
Openwisp Monitoring
Network monitoring system written in Python and Django, designed to be extensible, programmable, scalable and easy to use by end users: once the system is configured, monitoring checks, alerts and metric collection happens automatically.
Stars: ✭ 37 (-68.64%)
Mutual labels:  hacktoberfest, monitoring
Cimonitor
Displays CI statuses on a dashboard and triggers fun modules representing the status!
Stars: ✭ 34 (-71.19%)
Mutual labels:  hacktoberfest, monitoring
Cortex
A horizontally scalable, highly available, multi-tenant, long term Prometheus.
Stars: ✭ 4,491 (+3705.93%)
Mutual labels:  hacktoberfest, monitoring
Grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Stars: ✭ 45,930 (+38823.73%)
Mutual labels:  hacktoberfest, monitoring
Osquery
SQL powered operating system instrumentation, monitoring, and analytics.
Stars: ✭ 18,475 (+15556.78%)
Mutual labels:  hacktoberfest, monitoring
Check postgres
Nagios check_postgres plugin for checking status of PostgreSQL databases
Stars: ✭ 438 (+271.19%)
Mutual labels:  hacktoberfest, monitoring
Spidermon
Scrapy Extension for monitoring spiders execution.
Stars: ✭ 309 (+161.86%)
Mutual labels:  hacktoberfest, monitoring
Prometheus Operator
Prometheus Operator creates/configures/manages Prometheus clusters atop Kubernetes
Stars: ✭ 6,451 (+5366.95%)
Mutual labels:  hacktoberfest, monitoring
Monitor Adgroupmembership
PowerShell script to monitor Active Directory groups and send an email when someone is changing the membership
Stars: ✭ 190 (+61.02%)
Mutual labels:  hacktoberfest, monitoring
Librenms
Community-based GPL-licensed network monitoring system
Stars: ✭ 2,567 (+2075.42%)
Mutual labels:  hacktoberfest, monitoring
Whatpulse
WhatPulse reverse engineered
Stars: ✭ 30 (-74.58%)
Mutual labels:  hacktoberfest, monitoring
Prometheus
The Prometheus monitoring system and time series database.
Stars: ✭ 40,114 (+33894.92%)
Mutual labels:  hacktoberfest, monitoring

Tests Coverage Maintainability

My Internet Speed

I wrote this app so I can periodically monitor my internet speed and:

  • Collect data to build a report about the quality of the service provided by my ISP
  • Automatically tweet my ISP when the speed is lower than expected – surely optional
  • Store speed test results in PostgreSQL
  • Check all speed test results in a web API
  • Monitor all speed test tasks

At home this runs on my Raspberry Pi, but not all services are compatible — check my ideal setup for a suggestion on how to run these services.

Installing

Requirements

It is important to run this app in a computer connected to the internet via ethernet cable, not via wireless – this is the way to have some accuracy in testing the speed.

Optionally, if you want the Twitter feature to work (it will only tweet when the speed is below the configures threshold):

  • Twitter consumer key and secret
  • Twitter access token and access token secret

You can get these Twitter credentials at the Twitter Application Management dashboard.

Some speed test backends do not provide a URL with the results. In these cases we take a screenshot from the speed test result and upload it to Imgur. If you want to use this feature, you need an account there and a client ID for a registered application.

Settings

Before you get started, copy .env.sample as .env and edit as follows:

  1. Set INTERVAL according to how often (in minutes) you want to run the speed test (e.g.: 20 for 20min)
  2. Set your TIMEZONE accordingly

The default speed test backend is SpeedTest but you can use EAQ (Entidade Aferidora da Qualidade de Banda Larga) certified by ANATEL setting BACKEND to brasil_banda_larga.

If you want the app to post tweets:

  1. Add your Twitter credentials at the top of the file
  2. Set CONTRACT_SPEED to the speed in Mbps you are paying for (e.g.: 60 if you contract says 60Mbps)
  3. Set THRESHOLD to the minimum percentage of the contract speed you contract or local laws enforces your ISP (e.g.: 0.4 for 40%)
  4. Set your tweet message using {contract_speed} where the contract speed in Mbps should be (for example, 60 for 60Mbps), {real_speed} where the measured speed should be, and {percentage} where comparing both should be (feel free to use the Twitter handle of your ISP too)
  5. Add {result_url} in order to add the link to the result provided by the speed test backend

For example, if:

  • the measured speed is 20Mpbs
  • your CONTRACT_SPEED is 60
  • the THRESHOLD is 0.4
  • and TWEET is configures as I pay for {contract_speed}, but now @MyISP is working at {real_speed} – merely {percentage} of what I'm paying for :( {result_url}

The final tweet would be:

I pay for 60Mbps, but now @MyISP is working at 20Mbps – merely 33% of what I'm paing for :( http://www.speedtest.net/result/7307126311

If you like this app, add #MyInternetSpeed https://github.com/cuducos/my-internet-speed to your tweets ; )

Database

This docker-compose.yml lefts out the db container from all possible depends_on in order to make it easier to use an external/remote database to persist data (just point POSTGRESs variables and the PGRST ones to somewhere else).

Thus if you are using the Docker database it is useful to start it manually first:

$ docker-compose up -d db

In both cases run this one off command to create the database tables:

$ docker-compose run --rm beat python \
  -c "from my_internet_speed.models import Result; Result.create_table()"

Spinning up the app

$ docker-compose up -d

Services and compatibility

Containers

This spins up different services that might be useful to check the status of the speed tests:

Name URL ARM (RaspberryPi) compatibility Description
beat Main app that periodically runs the speed tests
dashboard http://localhost:3000/ 🚫 Minimalist dashboard with monthly speed test results
api http://localhost:3001/result/ 🚫 API to the database with all speed test results (check Postgrest for advanced filtering and exporting formats)
flower http://localhost:5555/ Flower dashboard for asynchronous tasks
db Database to store the speed test results
broker Queue to run the speed tests
chrome 🚫 Selenium web driver used for backends that requires a browser
Backends
Name Python path ARM (RaspberryPi) compatibility
SpeedTest my_internet_speed.backends.speed_test_net.SpeedTest
Barsil Banda Larga my_internet_speed.backends.brasil_banda_larga.SpeedTest 🚫

My ideal setup

Given the ARM processor incompatibilities, I actually use three computers to run these services:

  1. In my RaspberryPi (ARM processor, but it is still the only device with ethernet cable I have) I run beat, broker and flower:
    $ docker-compose up -d beat flower
  2. In my main computer (x86 processor) I run the api and the dashboard so I can check the results:
    $ docker-compose up -d beat dashboard
  3. The database I run in the cloud, a free tier at tiny turtle (free) at ElephantSQL

Troubleshooting

UnixHTTPConnectionPool(host='localhost', port=None): Read timed out.

I was getting this error in my Raspberry Pi when trying to run docker-compose up. This seams to be a workaround:

$ export DOCKER_CLIENT_TIMEOUT=600
$ export COMPOSE_HTTP_TIMEOUT=600

Testing

$ docker-compose run --rm beat py.test

Also we use Black code formatter:

$ docker-compose run --rm beat black . --check
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].