Git Product home page Git Product logo

smokeping-speedtest's Introduction

smokeping-speedtest

Smokeping::probes::speedtest

Integrates speedtest-cli (https://github.com/sivel/speedtest-cli) as a probe into smokeping. The variable "binary" must point to your copy of the speedtest-cli program. If it is not installed on your system yet, you should install the latest version from https://github.com/sivel/speedtest-cli. Note that you need at least version >=2.0.2 for speedtest-cli.

The Probe asks for the given resource one time, ignoring the pings config variable (because pings can't be lower than 3).

You can ask for a specific server (via the server parameter) and record a specific output (via the measurement parameter).

Note that you may want to change speedtest's forks parameter because basically: by default smokeping runs up to 5 speedtest probes at once, skewing overall results and possibly running into resource trouble on low spec devices. Setting forks = 1 will alleviate these issues.

Parameters:

  • binary => The location of your speedtest-cli binary.
  • server => The server id you want to test against (optional). If unspecified, speedtest.net will select the closest server to you. The value has to be an id reported by the command speedtest-cli --list
  • measurement => What output do you want graphed? Supported values are: ping, download, upload
  • extraargs => Extra arguments to send to speedtest-cli

You can use extraargs with --no-download or --no-upload if you want to skip some test direction (https://github.com/sivel/speedtest-cli/commit/3feb38d9d47d41e6b0679e3722dedb4511c437f6).

Installation:

Copy The speedtest.pm should be copied into your smokeping installation directory - for instance here: /opt/smokeping/lib/Smokeping/probes/

Logging: You can get logs of what goes on inside the plugin either by running smokeping with --debug, or by changing this line:

  #set to LOG_ERR to disable debugging, LOG_DEBUG to enable it
  setlogmask(LOG_MASK(LOG_ERR));

to

  #set to LOG_ERR to disable debugging, LOG_DEBUG to enable it
  setlogmask(LOG_MASK(LOG_DEBUG));

After doing this (and restarting smokeping), the plugin's logs will go to syslog, local0.debug. You will need something like

  local0.*     /var/log/local.log

in your syslog configuration.

Example probe configuration (poll every hour):


### Add this to your Probes file in conf.d folder

+ speedtest
binary = /usr/local/bin/speedtest-cli
timeout = 300
step = 3600
offset = random
pings = 3

++ speedtest-download
measurement = download

++ speedtest-upload
measurement = upload

### Add these to your Targets file.

++++ download_from_NextGen_Communications
menu = download_from_NextGen_Communications
title = download_from_NextGen_Communications
probe = speedtest-download
server = 1737
measurement = download
host = dummy.com

++++ upload_to_NextGen_Communications
menu = upload_to_NextGen_Communications
title = upload_to_NextGen_Communications
probe = speedtest-upload
server = 1737
measurement = upload
host = dummy.com

Bugs:

  • Currently the probe's unit of measurement is hardcoded to "bps". This will be a problem if you want to measure "ping", which is reported in seconds.
  • For large values the overview graphs will have wrong data. You need to add something like this to your overview section:
+overview
max_rtt = 1000000000

smokeping-speedtest's People

Contributors

mad-ady avatar kriztov 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.