Code Monkey home page Code Monkey logo

speedtest-for-influxdb-and-grafana's Introduction

Speedtest.net Collector For InfluxDB and Grafana

Screenshot

This tool is a wrapper for speedtest-cli which allows you to run periodic speedtets and save the results to Influxdb

Configuration within config.ini

GENERAL

Key Description
Delay Delay between runs

INFLUXDB

Key Description
Address Delay between updating metrics
Port InfluxDB port to connect to. 8086 in most cases
Database Database to write collected stats to
Username User that has access to the database
Password Password for above user

SPEEDTEST

Key Description
Server Comma sperated list of servers. Leave blank for auto

LOGGING

Key Description
Level Set how verbose the console output is

Usage

Before the first use run pip3 install -r requirements.txt

Enter your desired information in config.ini

Run influxspeedtest.py

Custom Config File Name

If you wish to use a config file by a different name set an ENV Variable called influxspeedtest. The value you set will be the config file that's used.

Requirements

Python 3+

You will need the influxdb library installed to use this - Found Here You will need the speedtest-cli library installed to use this - Found Here

Docker Setup

  1. Install Docker

  2. Make a directory to hold the config.ini file. Navigate to that directory and download the sample config.ini in this repo.

mkdir speedtest
curl -o speedtest/config.ini https://raw.githubusercontent.com/barrycarey/Speedtest-for-InfluxDB-and-Grafana/master/config.ini
cd speedtest
  1. Modify the config file with your influxdb settings.
nano config.ini

Modify the 'Address =' line include the ip or hostname of your influxdb instance. Example:

Address = 10.13.14.200
  1. Run the container, pointing to the directory with the config file. This should now pull the image from Docker hub. You can do this by either running docker run or by using docker-compose.
  2. The docker run option.
docker run -d \
--name="speedtest" \
-v config.ini:/src/config.ini \
--restart="always" \
barrycarey/speedtest-for-influxdb-and-grafana
  1. The docker-compose option
curl -O https://raw.githubusercontent.com/barrycarey/Speedtest-for-InfluxDB-and-Grafana/master/docker-compose.yml docker-compose.yml
docker-compose up -d

speedtest-for-influxdb-and-grafana's People

Contributors

barrycarey avatar atribe avatar ax42 avatar threesquared avatar dirkjanfaber 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.