Forge Home

speedtest

Command line interface for testing internet bandwidth using speedtest.net

8,612 downloads

6,557 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.9 (latest)
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.2
released Nov 23rd 2017
This version is compatible with:
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'icann-speedtest', '0.1.9'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add icann-speedtest
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install icann-speedtest --version 0.1.9

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

icann/speedtest — version 0.1.9 Nov 23rd 2017

Build Status Puppet Forge Puppet Forge Downloads

puppet-speedtest

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with speedtest
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

puppet module to install and manage

speedtest-cli. It allows to run as a cronjob and save the result into an output file.

Module Description

This module will install speedtest-cli (script based on python) that can be used to test internet bandwidth using speedtest.net servers.

This module provides the ability to run a cronjob, capture the output and using ::file_upload will transfer the output to a central location

Setup

What speedtest affects

  • installs and manages speedtest-cli
  • If enabled, creates a cronjob that will use ::file_upload to secure copy the output to a central location

Setup requirements

  • Python > 2.7
  • file_upload

Beginning with speedtest

Install the module

class {'::speedtest':
  ensure => present
}

In hiera

speedtest::ensure: present

Usage

Basic config

Set the output directory and format

class {'::speedtest':
  output_dir    => '/var/tmp',
  output_file   => 'speedtest-out',
  output_format => 'csv'
}

Transferring files

If want to enable upload, set that up with

class {'::speedtest':
  enabled_upload    => true,
  upload_dir        => '/opt/upload',
  upload_host       => 'example.org',
  upload_key_source => <ssh_key_user>,
  upload_user       => 'user',
}

Reference

Public classes

  • ensure (<present|absent>, Default: present): To activate or not the module so the file structure and scripts can be created
  • speedtest_run (Stdlib:Absolutepath, Default: '/usr/local/bin/speedtest-run.sh'): Location and name for the script that will run the cronjob
  • user (String, Default: 'root'): user that owns the directory where output is saved
  • group (String, Default: 'root'): group that owns the directory where output is saved
  • output_dir (Stdlib:Absolutepath, Default: /var/tmp/speedtest): where to store the report
  • output_file_name (String, Default: speedtest-$::fqdn): the file name of the report
  • package (String, Default: speedtest-cli): the pip package to install
  • location (Optional|String, Default: undef): Closest city to test the bandwidth against to.
  • no_tests (Interger, Default: 1): the number of tests to preform
  • no_test_servers (Interger, Default: 1): If location is present the number of servers to test from that location
  • upload_test (Boolean, Default: true): weather or not to preform an upload test
  • download_test (Boolean, Default: true): weather or not to preform an download test
  • output_format (<json|csv>, Default: 'csv'): Output format after run the test
  • enable_upload (Boolean, Default: false): Enable the use of ::file_upload
  • upload_dir (Optional|Stdlib:Absolutepath,, Default: undef): Location of remote host to upload output
  • upload_host (Optional|Tea::Host, Default: undef): Hostname or IP of the remote host to upload the output
  • upload_key_source (Optional|Tea:Puppetsource, Default: undef): puppet resource that defines where the ssh key is located to conect to the remote host (Note: the public/private key pair must be created before using this module and configured on the other host as well)
  • upload_user (String, Default: 'speedtest'): username of the remote user host to upload the output
  • weekday (Integer, Default 2): The weekday on which to run the speedtest-run. 0 or 7 represent Sunday
  • monthday (Integer|String, Default 'Tuesday'): The day of the month on which to run the speedtest-run. Can be one day or a range of days.

Private classes

Class speedtest::params

Set specific parameters about the package and where to locate outputs

Limitations

This module has been tested on:

  • Ubuntu 16.04

Development

Pull requests welcome but please also update documentation and tests.