Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
- Puppet >= 7.24 < 9.0.0
- , , , , , ,
Documentation
puppetlabs-puppet_data_connector
Table of Contents
Intro
This module installs a custom report processor to export Puppet Report metric data into the Prometheus metric format. It also configures the puppet_data_exporter.service
, which runs a node_exporter to expose the metric data for ingestion by Prometheus.
Compatible PE Versions
This module is compatible with PE versions >= 2023.7.1
.
Usage
-
Install the module in your environment.
-
Classify your Puppet Servers with the
puppet_data_connector
class. Set the dropzone parameter, which refers to the directory location where the Prometheus metric data files will be created.- Optional: Configure the filter parameters.
- Optional: Configure the
puppet_data_connector::prometheus_exporter::port
parameter in your hiera data to run the exporter on an alternate port.- Default Port:
9100
.
- Default Port:
Example:
class { "puppet_data_connector": dropzone => "/opt/puppetlabs/puppet/puppet_data_connector", }
-
Run puppet to compile the catalog. Puppet Server will restart during the run and metric data will begin collecting on the next run.
-
Confirm the data is available on
http://$PE_SERVER_FQDN:9100/metrics
.
Filtering and Troubleshooting
Filtering is a block list. Adding a filter will remove the data from the data set.
class { "puppet_data_connector":
dropzone => "/opt/puppetlabs/puppet/puppet_data_connector",
metric_filter => ["events","time"], # optional
events_filter => ["success"], # optional
}
This example will NOT show "events" or "time" for metrics. It will also not show successes for the events.
Reference
Table of Contents
Classes
Public Classes
puppet_data_connector
: This class manages the Puppet Data Connector.
Private Classes
puppet_data_connector::prometheus_exporter
: Subclass to configure the Prometheus node_exporter.
Data types
Puppet_Data_Connector::Uri
: A URI that can be used to download the Prometheus node_exporter package.
Classes
puppet_data_connector
Configuration and installation of the Puppet Data Connector report processor and Prometheus node_exporter.
Examples
include puppet_data_connector
Parameters
The following parameters are available in the puppet_data_connector
class:
dropzone
Data type: String
Absolute path to dropzone directory. Note: This module creates and manages the dropzone directory.
disabled
Data type: Optional[Boolean]
When 'true', removes report processor settings from puppet.conf.
Default value: false
stale_time
Data type: Optional[Integer]
Number of days without report data, after which a file in the dropzone is considered stale.
Default value: undef
metric_filter
Data type:
Optional[Array[Enum[
'changes',
'events',
'resources',
'time']]]
A filter to exclude metric types from collection.
Default value: undef
events_filter
Data type:
Optional[Array[Enum[
'success',
'failure',
'audit',
'noop',
'total']]]
A filter to exclude certain event types from collection.
Default value: undef
resources_filter
Data type:
Optional[Array[Enum[
'failed',
'out_of_sync',
'changed',
'total',
'skipped',
'failed_to_restart',
'restarted',
'scheduled',
'corrective_change']]]
A filter to exclude certain resource statuses from collection.
Default value: undef
Data types
Puppet_Data_Connector::Uri
A URI that can be used to download the Prometheus node_exporter package.
Alias of Variant[Stdlib::Filesource, Stdlib::HTTPUrl, Stdlib::HTTPSUrl, Pattern[/^s3:\/\//], Pattern[/^gs:\/\//]]
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.0.0 - 2024-09-20
Added
- Converts Puppet Report Metrics to prometheus format.
- Prometheus data is made available with a node_exporter.
- Metrics can be filtered.
- The node_exporter port can be set. It is defaulted to 9100.
Dependencies
- puppetlabs/stdlib (>= 9.0.0 < 10.0.0)
- puppet/systemd (>= 1.1.1 < 7.0.0)
- puppet/archive (>= 2.2.0 < 8.0.0)