Forge Home

puppet_operational_dashboards

A module for managing the installation and configuration of metrics dashboards for Puppet Infrastructure.

15,580 downloads

430 latest version

5.0 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.3.0 (latest)
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.13.1
  • 1.13.0
  • 1.12.0
  • 1.11.0
  • 1.10.0
  • 1.9.0
  • 1.8.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
  • 0.2.0
  • 0.1.2
released Mar 8th 2022
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 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, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 8.0.0
  • , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'puppetlabs-puppet_operational_dashboards', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-puppet_operational_dashboards
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-puppet_operational_dashboards --version 0.1.2

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

puppetlabs/puppet_operational_dashboards — version 0.1.2 Mar 8th 2022

puppet_operational_dashboards

Table of Contents

  1. Description
  2. Setup - The basics of getting started with puppet_operational_dashboards
  3. Usage - Configuration options and additional functionality

Description

This module is a replacement for the puppet_metrics_dashboard module. It is used to configure Telegraf, InfluxDB, and Grafana to collect, store, and display metrics collected from Puppet services. By default, those components are installed on a separate Dashboard node by applying the base class of this module to that node. That class will automatically query PuppetDB for Puppet Infrastructure nodes (Primary server, Compilers, PuppetDB hosts, PostgreSQL hosts) or you can specify them via associated class parameters. It is not recommended to apply the base class of this module to one of your Puppet Infrastructure nodes.

Setup

Prerequisites

The toml-rb gem needs to be installed in the Puppetserver gem space, which can be done with the influxdb::profile::toml class in the InfluxDB module.

To collect PostgreSQL metrics, classify your PostgreSQL nodes with the puppet_operational_dashboards::profile::postgres_access class. FOSS users will need to manually configure the PostgreSQL authentication settings.

Beginning with puppet_operational_dashboards

The easiest way to get started using this module is by including the puppet_operational_dashboards class to install and configure Telegraf, InfluxDB, and Grafana. Note that you also need to install the toml-rb gem according to the prerequisites.

include puppet_operational_dashboards

Doing so will:

  • Install and configure InfluxDB using the puppetlabs/influxdb module
  • Install and configure Telegraf to collect metrics from your PE infrastructure. FOSS users can specify a list of infrastructure nodes via the puppet_operational_dashboards::telegraf::agent parameters.
  • Install and configure Grafana with several dashboards to display data from InfluxDB

Note that this will save an InfluxDB administrative token to the user's home directory, typically /root/.influxdb_token. The type and provider code can use this token, but it is not available to Puppet server to be used in compiling catalogs. In order to use the Telegraf token created by this module, you will need to either:

  • Supply this admin token via the influxdb::token parameter.
  • Supply the Telegraf token via the puppet_operational_dashboards::telegraf_token parameter.

These are both Sensitive strings, so the recommended way is to encrypt them with hiera-eyaml and use the encrypted value in hiera. For example:

influxdb::token: <eyaml_encrypted_string>
lookup_options:
   influxdb::token:
     convert_to: "Sensitive"

Usage

Determining where Telegraf runs

Which hosts a node collects metrics from is determined by the puppet_operational_dashboards::telegraf::agent::collection_method parameter. By default, the puppet_operational_dashboards class will collect metrics from all nodes in a PE infrastructure. If you want to change this behavior, set collection_method to local or none. Telegraf can be run on other nodes by applying the puppet_operational_dashboards::telegraf::agent class to them, for example:

class {'puppet_operational_dashboards::telegraf::agent':
  collection_method => 'local',
  token => <my_sensitive_token>,
}

Importing archive metrics

Metrics archives output by the Puppet metrics collector can be imported into InfluxDB using the scripts in the examples/ directory. The sample bucket_and_datasource class shows how to configure an InfluxDB bucket and Grafana datasource, while the Telegraf files can be used to load the data into the bucket. After setting up the bucket and datasource:

  • Download the telegraf.conf and telegraf.conf.d files to your home directory.
  • Extract the archive
tar xf <metrics_gz>
cd <output_directory>
  • Delete any Puppet server metrics with errors.

Currently, these will cause the telegraf process to exit upon encountering an error. Delete these with:

find <puppet_server_metrics_dir> -type f -name "*json" -size -1000c -delete
  • Edit telegraf.conf to point to your bucket (<my_bucket>) and InfluxDB server (<influxdb_fqdn>).
  • Export your Telegraf token
export INFLUX_TOKEN=<token>

This token can be found in the "API Tokens" tab of the "Data" page in InfluxDB

  • Run Telegraf to import the metrics. This can be done all at once:
telegraf --once --debug --config ~/telegraf.conf --config-directory ~/telegraf.conf.d/

Or one service at a time, e.g. for Puppet server

telegraf --once --debug --config ~/telegraf.conf --config ~/telegraf.conf.d//puppetserver.conf