Forge Home

porttest

TCP/UDP simple port tests

9,127 downloads

9,127 latest version

3.1 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.0 (latest)
released Jun 17th 2015
This version is compatible with:
  • Puppet Enterprise >= 3.0.0
  • Puppet 3.x
  • , , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'bryana-porttest', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add bryana-porttest
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install bryana-porttest --version 0.1.0

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
Tags: test, tcp, udp, port, porttest

Documentation

bryana/porttest — version 0.1.0 Jun 17th 2015

porttest

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with porttest
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Overview

TCP and UDP port testing for Puppet.

Setup

What porttest affects

  • A small python script is installed in a user configurable location. This runs the TCP and UDP testing. On success a file is touched so the host+port is only tested once instead of being tested on every puppet agent run.

Setup Requirements

Python is needed and assumed installed. Even old RedHat 5 systems have the needed Python modules installed.

Beginning with porttest

Usage

porttest::tcp { 'test tcp 80 to google.com': 
  target => 'google.com', 
  port   => '80', 
}

porttest::udp { 'test udp to my server': 
  target => 'udp-host.domain.local', 
  port   => '5000', 
}

Reference

###Defines

####Public defines

  • porttest::tcp: Test TCP ports on hosts
  • porttest::udp: Test UDP ports on hosts

####Private classes

  • porttest::install: Installs the port test Python script

###Parameters

#####target

Specify the IP, hostname, or FQDN of the target to test

#####port

Specify the port of the target to test

Limitations

Python is the only requirement and comes installed with all modern Linux flavors. UDP is inherently difficult to test for. Due to the nature of UDPs fire-and-forget packet it is up to the destination service application to respond in a detectable way. If the destination service port is closed or the service doesn