Forge Home


Module for installing and managing influxdb-relay


6,024 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

  • 1.0.1 (latest)
  • 1.0.0
released Jul 11th 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 'spacepants-influxdb_relay', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add spacepants-influxdb_relay
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install spacepants-influxdb_relay --version 1.0.1

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.



spacepants/influxdb_relay — version 1.0.1 Jul 11th 2017

InfluxDB Relay module for Puppet

Build Status

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 InfluxDB Relay
    • [What InfluxDB Relay affects](#what-InfluxDB Relay-affects)
    • Setup requirements
    • [Beginning with InfluxDB Relay](#beginning-with-InfluxDB Relay)
  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


This module allows you to install and manage InfluxDB Relay.

Module Description

This module installs and configures InfluxDB Relay, a basic high availability layer to InfluxDB.


InfluxDB Relay prerequisites

  • InfluxDB Relay requires Go 1.5+. This can be done using the dcoxall-golang module.
  • You'll also need git installed and available on your path.

What InfluxDB Relay affects

  • A daemon user. Default: influxdb-relay
  • The data directory. Default: /var/lib/influxdb-relay
  • The log directory. Default: /var/log/influxdb-relay
  • A logrotate rule.
  • The config file.
  • The influxdb-relay service. Note: Service management can be disabled.

Beginning with InfluxDB Relay


Basic example
include ::influxdb_relay

Out of the box the module will set up a basic config. This sets up an HTTP server listening on the node's IP at port 9096, configured for two InfluxDB HTTP backends running on the same node on ports 7086 and 8086, respectively.

For a node with an FQDN of and an IP of, its rendered config file would look like this:

name = ""
bind-addr = ""

output = [
  { name="local1", location="", timeout="10s" },
  { name="local2", location="", timeout="10s" },
Setting HTTP backends

HTTP backends can be declared like in the following example:

class { '::influxdb_relay':
  http_backends => {
    backend1 => {
      location => '',
      params   => {
        timeout => '10s',
    backend2 => {
      location => '',
      params   => {
        timeout => '10s',

HTTP backend parameters

Additional options such as buffering failed requests can be accomplished by providing the desired parameters.

class { '::influxdb_relay':
  http_backends => {
    backend1 => {
      location => '',
      params   => {
        'buffer-size-mb'     => 100,
        'max-batch-kb'       => 50,
        'max-delay-interval' => '5s',
UDP backends

UDP backends are specified similarly to HTTP backends.

class { '::influxdb_relay':
  udp_backends => {
    backend1 => {
      location => '',
      params   => {
        mtu => 1024,
Enabling SSL

Enabling SSL can be accomplished by providing the filename of the combined PEM certificate.

class { '::influxdb_relay':
  ssl_cert_name => 'certificate.pem',

By default, the module presumes that the certificate is in the OS default certificate store, (/etc/ssl on Debian family systems, /etc/pki/tls/certs on RedHat family systems) but this can be overridden by providing the path to the directory.

class { '::influxdb_relay':
  ssl_cert_name => 'certificate.pem',
  ssl_dir       => '/path/to/your/directory',



Public Classes

  • influxdb_relay: Main class, manages the installation and configuration of influxdb-relay

Private Classes

  • influxdb_relay::install: Installs influxdb-relay
  • influxdb_relay::config: Modifies influxdb-relay configuration files
  • influxdb_relay::service: Manages the influxdb-relay service



The user to run influxdb-relay as. Default: influxdb-relay


The group to run influxdb-relay as. Default: influxdb-relay


Whether to manage the influxdb-relay service. Default: true


Whether to enable the influxdb-relay service. Default: true


Desired service state. Default: 'running'


Name of the HTTP server. Default: "${::fqdn}-http"


TCP address to bind to for HTTP server. Default: $::ipaddress


TCP port to bind to for HTTP server. Default: 9096


A hash of InfluxDB instances to use as HTTP backends for relay. See examples.


Name of the UDP server. Default: "${::fqdn}-udp"


UDP address to bind to. Default: $::ipaddress


UDP port to bind to. Default: 9096


Socket buffer size for incoming connections. Default: 0


Precision to use for timestamps. Default: 'n'


A hash of InfluxDB instances to use as UDP backends for relay. See examples.


Name of the ssl cert file to use for HTTPS requests. Optional.


Path to the directory of the ssl cert. Defaults to OS default cert store.


Path to the config file directory. Default: '/etc/influxdb-relay'


Path to the influxdb-relay data directory. Default: '/var/lib/influxdb-relay'


Path to the influxdb-relay log directory. Default: '/var/log/influxdb-relay'


Path to the Go bin path. Default: '/usr/local/go/bin'


Path to the Go workspace. Default: '/usr/local/src/go'


This module is currently tested and working on RedHat and CentOS 6, and 7, Debian 7 and 8, and Ubuntu 12.04, 14.04, and 16.04 systems.


Pull requests welcome. Please see the contributing guidelines below.


  1. Fork the repo.

  2. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate.

  3. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.

  4. Make the test pass.

  5. Push to your fork and submit a pull request.