Forge Home

relay

Configure a puppetserver to submit reports to Relay workflow triggers

8,722 downloads

2,113 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

  • 2.5.1 (latest)
  • 2.5.0
  • 2.4.0
  • 2.3.2
  • 2.3.1 (deleted)
  • 2.3.0
  • 2.2.0
  • 2.1.5
  • 2.1.0
  • 2.0.0
  • 1.2.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Oct 7th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • , , , , ,
This module has been deprecated by its author since Jun 23rd 2023.

Start using this module

Documentation

puppetlabs/relay — version 1.0.0 Oct 7th 2020

relay

Table of Contents

  1. Description
  2. Setup - The basics of getting started with relay
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

This module configures a report processor to submit any changed resources to the Relay SaaS event trigger API. Workflows may subscribe to the triggers and decide whether to run based on the run status and log lines.

Setup

Requirements

You must already have a puppetserver to which puppet agents submit reports and that can connect to the internet.

You must also have a Relay account registered. You can sign up for one at https://relay.sh/ if you do not already have one.

Configuration

The report processor also needs a Relay push-trigger access token that is authorized to talk to the Relay API. To get an access token, add a workflow push trigger to a Relay workflow and copy the token from the sidebar.

Please see our documentation for further details on configuring push triggers.

Deployment

The report processor may be automatically set up by classifying the puppetserver host with the relay::reporting class. This class will:

  1. configure the report processor list of the puppetserver to include the relay report processor
  2. place the access token in the appropriate location for the report processor
  3. reload the puppetserver process to load the new report processor

The classification will look something like this:

class profile::relay_reporting {
  class { 'relay::reporting':
    access_token => 'eyJhbGciOiJ......XUsf3o',
  }
}

Reference

relay::reporting

This is class used to configure the report processor.

Parameters

access_token

Required: The token by which the report processor authenticates to the Relay API. Valid options: 'string'.

reports_url

The URL of the Relay events API. Valid option: 'string'

Default: 'https://api.relay.sh/api/events'

Relay trigger properties

Every relay trigger payload has properties that can be acted upon. The properties for this trigger are derived from the puppet report object as detailed in the official documentation.

host

Type: string

The hostname that submitted the report.

logs

Type: array of strings

An array of the log lines that were notice severity or greater. This is useful for matching based on changes performed by specific classes, resource types, resource titles, property values, etc.

summary

Type: string

This is the long-form summary of the puppet run. It is more useful from a human perspective but may be inspected programmatically for puppet run information.

status

Type: string

This is the run status. Useful for detecting runs that caused changes, or runs that were failures.

time

Type: string

The timestamp of when the puppet run began.

Limitations

The report processor submits a subset of the full report. Full report submission will come soon, as they need to be compressed before transmission.