puppet_metrics_collector
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, 2023.0.x, 2021.7.x
- Puppet >= 7.18.0 < 9.0.0
- , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-puppet_metrics_collector', '8.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Table of Contents
- Table of Contents
- Supporting Content
Overview
This module collects metrics provided by the status endpoints of Puppet Enterprise services. The metrics can be used to identify performance issues that may be addressed by performance tuning.
For PE versions older than 2019.8.5, access to the
/metrics/v2
API endpoint is restricted tolocalhost
as a mitigation for CVE-2020-7943. This module requires access the/metrics/v2
API to collect a complete set of performance metrics from PuppetDB. Refer to Configuration for Distributed Metrics Collection for a workaround.
Setup
Installation
Install this module with puppet module install puppetlabs-puppet_metrics_collector
or add it to your Puppetfile.
To activate this module, classify your Primary Server with the puppet_metrics_collector
class using your preferred classification method.
Below is an example using site.pp
.
node 'primary.example.com' {
include puppet_metrics_collector
}
Optionally, you can gather basic system metrics.
Unlike service metrics, system metrics have to be enabled locally on each PE Infrastructure Host, and the resulting data will be stored locally on that host.
This functionality depends on sysstat
.
node 'primary.example.com' {
include puppet_metrics_collector
include puppet_metrics_collector::system
}
node 'compilerA.example.com', 'compilerB.example.com,' {
include puppet_metrics_collector::system
}
Note: Do not
include
the top-levelpuppet_metrics_collector
class on any PE Infrastructure Host other than the Primary Server, otherwise it will collect the same data as the Primary Server.
Configuration
This module automatically configures the hosts it collects metrics from by querying PuppetDB for PE Infrastructure Hosts. If there is an error with the automatic configuration of hosts, refer to Manual Configuration of Hosts.
Parameters
For each Puppet Enterprise service (Puppet Server, PuppetDB, Orchestrator, Ace, Bolt, and ActiveMQ) there are associated <service_name>_ensure
, <service_name>_hosts
, and <service_name>_port
parameters.
Refer to manifests/init.pp
for details.
output_dir
String
: Output directory for collected metrics.
Defaults to /opt/puppetlabs/puppet-metrics-collector
.
collection_frequency
Integer
: How often to collect metrics, in minutes.
Defaults to 5
.
retention_days
Integer
: How long to retain collect metrics, in days.
Defaults to 90
.
Metrics Server Parameters
The following set of parameters begining with metrics_server_
allows for the specification of a server type to use to generate and (in some cases) send data to a specified metrics server.
Currently, both influxdb
and graphite
types allow for the transfer of data while splunk_hec
only generates data.
metrics_server_type
Optional Enum['influxdb','graphite','splunk_hec']
: The metrics server type to send data to.
Currently, this module supports influxdb
, graphite
, and splunk_hec
metrics server types.
For the influxdb
metrics server type, a metrics_server_db_name
must be provided.
For the splunk_hec
metrics server type, data cannot be sent to a server, however the command will format the JSON output using the splunk_hec
module, which is a requirement for this option. The splunk_hec
module can be found on the Forge or GitHub.
Setup instructions for the splunk_hec
module can be found within that module's README.
metrics_server_hostname
Optional String
: The hostname of the metrics server to send data to.
Defaults to undef
.
metrics_server_port
Optional Integer
: The port number of the metrics server to send data to.
Defaults to undef
.
metrics_server_db_name
Optional String
: The database name on the metrics server to send data to.
Required for metrics_server_type
of influxdb
.
Defaults to undef
.
override_metrics_command
Optional String
: Allows you to define the command that is executed to gather metrics.
Defaults to undef
.
Usage
Searching Metrics
Metrics are formatted as a JSON hash on one line.
In order to convert the metric files into a multi-line format, they can be processed with python -m json.tool
as per below.
cd /opt/puppetlabs/puppet-metrics-collector
for i in <service_name>/primary.example.com/*.json; do echo "$(python -m json.tool < $i)" > $i; done
You can search for useful information by performing a grep
, run from inside the directory containing the metrics
cd /opt/puppetlabs/puppet-metrics-collector
grep -oP '"<metric_name>,*?,' <service_name>/primary.example.com/*.json
or JQ if available
cd /opt/puppetlabs/puppet-metrics-collector
jq '.. |."<metric_name>"? | select(. != null)| input_filename , .' -- <service_name>/primary.example.com/*.json
Since the metrics are archived once per day, you can only search metrics for the current day.
To search older metrics, decompress the archived files into a subdirectory of /tmp
and run your search from inside that directory.
Searching Puppetserver Metrics
Example:
grep -oP '"average-free-jrubies.*?,' puppetserver/primary.example.com/*.json
puppetserver/primary.example.com/20190404T170501Z.json:"average-free-jrubies":0.9950009285369501,
puppetserver/primary.example.com/20190404T171001Z.json:"average-free-jrubies":0.9999444653324225,
puppetserver/primary.example.com/20190404T171502Z.json:"average-free-jrubies":0.9999993830655706,
jq '.. |."average-free-jrubies"? | select(. != null)| input_filename , .' -- puppetserver/primary.example.com/*.json
"puppetserver/primary.example.com/20190404T170501Z.json"
0.9950009285369501
"puppetserver/primary.example.com/20190404T171001Z.json"
0.9999444653324225,
"puppetserver/primary.example.com/20190404T171502Z.json"
0.9999993830655706,
Searching PuppetDB Metrics
Example:
grep -oP '"queue_depth.*?,' puppetdb/primary.example.com/*.json
puppetdb/primary.example.com/20190404T170501Z.json: "queue_depth": 0,
puppetdb/primary.example.com/20190404T171001Z.json: "queue_depth": 0,
puppetdb/primary.example.com/20190404T171502Z.json: "queue_depth": 0,
jq '.. |."queue_depth "? | select(. != null)| input_filename , .' -- puppetdb/primary.example.com/*.json
"puppetdb/primary.example.com/20190404T170501Z.json"
0
"puppetdb/primary.example.com/20190404T171001Z.json"
0
"puppetdb/primary.example.com/20190404T171502Z.json"
0
Sharing Metrics Data
When working with Support, you may be asked for an archive of collected metrics data.
This module provides a script, create-metrics-archive
to archive metrics data for sending to Support.
/opt/puppetlabs/puppet-metrics-collector/scripts/create-metrics-archive
This script creates the archive in the current working directory.
It takes an optional -m
or --metrics-directory
parameter (default /opt/puppetlabs/puppet-metrics-collector
) to specify an alterate metrics directory to archive.
It takes an optional -r
or --retention-days
parameter (default: 30
) to limit the number of days to include in the archive.
[root@primary ~]# /opt/puppetlabs/puppet-metrics-collector/scripts/create-metrics-archive
Created metrics archive: /root/puppet-metrics-collector-20200203T123456Z.tar.gz
Reference
Directory Layout
This module creates an output directory with one subdirectory for each Puppet Enterprise service (Puppet Server, PuppetDB, Orchestrator, Ace, Bolt, and ActiveMQ) that this module has been configured to collect. Each service directory has one subdirectory for each host. Each host directory contains one JSON file, collected every 5 minutes. Once per day, the metrics for each service are archived and compressed.
Example:
/opt/puppetlabs/puppet-metrics-collector/puppetserver
├── primary.example.com
│ ├── 20190404T020001Z.json
│ ├── ...
│ ├── 20190404T170501Z.json
│ └── 20190404T171001Z.json
└── puppetserver-2019.04.04.02.00.01.tar.gz
/opt/puppetlabs/puppet-metrics-collector/puppetdb
└── primary.example.com
│ ├── 20190404T020001Z.json
│ ├── ...
│ ├── 20190404T170501Z.json
│ ├── 20190404T171001Z.json
└── puppetdb-2019.04.04.02.00.01.tar.gz
Systemd Timers
This module creates two systemd timers for each Puppet Enterprise service:
- One to collect the metrics
- Runs as per
collection_frequency
- Runs as per
- One to archive collected metrics and delete metrics older than the retention period, as per
retention_days
- Runs at randomly selected time between 12:00 AM and 3:00 AM
Alternate Setup
Temporary Installation
While a permanent installation is recommended, this module can be temporarily installed with the following commands.
puppet module install puppetlabs-puppet_metrics_collector --modulepath /tmp;
puppet apply -e "class { 'puppet_metrics_collector': }" --modulepath /tmp;
Manual Configuration of Hosts
If necessary, you can manually configure this module by specifying parameters via the class declaration or via Hiera data. The preferred method is via Hiera data. The following examples show you how to specify those parameters for different infrastructures, and assumes you declare this module on the Primary Server.
Monolithic Infrastructure with Compilers
Hiera Data Example
puppet_metrics_collector::puppetserver_hosts:
- 'primary.example.com'
- 'compiler-1.example.com'
- 'compiler-2.example.com'
puppet_metrics_collector::puppetdb_hosts:
- 'primary.example.com'
Class Declaration Example
class { 'puppet_metrics_collector':
puppetserver_hosts => [
'primary.example.com',
'compiler-1.example.com',
'compiler-2.example.com'
],
puppetdb_hosts => ['primary.example.com'],
}
Configuration for Distributed Metrics Collection
This option collect metrics on each PE Infrastructure Host instead of collecting metrics centrally on the Primary Server. This option is discouraged, but allows for the collection of metrics when the Primary Server cannot access the API endpoints of the other PE Infrastructure Hosts. Classify each PE Infrastructure Host with this module, specifying the following parameters.
When classifying a Compiler, specify these additional parameters:
class { 'puppet_metrics_collector':
puppetserver_hosts => ['127.0.0.1'],
puppetdb_metrics_ensure => absent,
orchestrator_metrics_ensure => absent,
ace_metrics_ensure => absent,
bolt_metrics_ensure => absent,
}
When classifying a PuppetDB Host, specify these additional parameters:
class { 'puppet_metrics_collector':
puppetdb_hosts => ['127.0.0.1'],
puppetserver_metrics_ensure => absent,
orchestrator_metrics_ensure => absent,
ace_metrics_ensure => absent,
bolt_metrics_ensure => absent,
}
How to Report an issue or contribute to the module
If you are a PE user and need support using this module or are encountering issues, our Support team would be happy to help you resolve your issue and help reproduce any bugs. Just raise a ticket on the support portal. If you have a reproducible bug or are a community user you can raise it directly on the Github issues page of the module here. We also welcome PR contributions to improve the module. Please see further details about contributing here.
Supporting Content
Articles
The Support Knowledge base is a searchable repository for technical information and how-to guides for all Puppet products.
This Module has the following specific Article(s) available:
- Troubleshoot and fix performance issues with the puppetlabs-puppet_metrics_collector module in Puppet Enterprise
- Manage the installation and configuration of metrics dashboards using the puppetlabs-puppet_metrics_dashboard module for Puppet Enterprise 2016.4 to 2019.1
- Troubleshooting potential issues in Puppet Enterprise: How to learn more
Videos
The Support Video Playlist is a resource of content generated by the support team
This Module has the following specific video content available:
Reference
Table of Contents
Classes
Public Classes
puppet_metrics_collector
: This module manages the collection of Puppet and system Metricspuppet_metrics_collector::system
: This class manages collect postgres and system metrics
Private Classes
puppet_metrics_collector::service::ace
: Collects ace metricspuppet_metrics_collector::service::bolt
: Collects bolt metricspuppet_metrics_collector::service::console
: Collects console metricspuppet_metrics_collector::service::orchestrator
: Collects orchestrator metricspuppet_metrics_collector::service::puppetdb
: Collects puppetdb metricspuppet_metrics_collector::service::puppetserver
: Collect puppetserver metricspuppet_metrics_collector::system::postgres
: Collects postgres Metricspuppet_metrics_collector::system::processes
: Collects System Processes Metricspuppet_metrics_collector::system::sar
: Collects System CPU Metricspuppet_metrics_collector::system::vmware
: Collects System vmware Metrics
Defined types
puppet_metrics_collector::collect
: Creates systemd units for collecting a given metricpuppet_metrics_collector::deprecated_parameter
puppet_metrics_collector::pe_metric
: A defined type to manage the configuration of tbe different metrics collection targetspuppet_metrics_collector::sar_metric
: This class manages the collections of SAR metrics
Functions
puppet_metrics_collector::hosts_with_pe_profile
: Function: hosts_with_pe_profile Queries PuppetDB for hosts with the specified Puppet Enterprise profile. Used by this module to query Puppetpuppet_metrics_collector::to_yaml
: Description: Converts the content of the passed array or hash to YAMLpuppet_metrics_collector::version_based_excludes
: Function: version_based_excludes Description: Generates a list of services to exlude based on the metrics type
Classes
puppet_metrics_collector
Optional Enum['splunk_hec']: The metrics server type to send data to. Default: undef
@ param metrics_server_hostname Optional String: The hostname of the metrics server to send data to. Default: undef
@ param metrics_server_port Optional Integer: The port number of the metrics server to send data to. Default: undef
Optional String: (Deprecated)The database name on the metrics server to send data to. Default: undef
Optional String: Allows you to define the command that is executed to gather metrics. Default: undef
Optional String: Collection of ActiveMQ metrics has been removed, but the parameters are left to avoid breaking upgrades Optional String: Collection of ActiveMQ metrics has been removed, but the parameters are left to avoid breaking upgrades Optional Integer: Collection of ActiveMQ metrics has been removed, but the parameters are left to avoid breaking upgrades
Parameters
The following parameters are available in the puppet_metrics_collector
class:
puppetserver_metrics_ensure
output_dir
collection_frequency
retention_days
puppetserver_hosts
puppetserver_port
puppetdb_metrics_ensure
puppetdb_hosts
puppetdb_port
orchestrator_metrics_ensure
orchestrator_hosts
orchestrator_port
console_metrics_ensure
console_hosts
console_port
ace_metrics_ensure
ace_hosts
ace_port
bolt_metrics_ensure
bolt_hosts
bolt_port
metrics_server_type
metrics_server_db_name
override_metrics_command
activemq_metrics_ensure
activemq_hosts
activemq_port
puppetserver_excludes
puppetdb_excludes
orchestrator_excludes
console_excludes
ace_excludes
bolt_excludes
activemq_excludes
metrics_server_hostname
metrics_server_port
puppetserver_metrics_ensure
Data type: String
Whether to enable or disable the collection of Puppetserver metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
output_dir
Data type: String
The directory to write the metrics to. Default: '/opt/puppetlabs/puppet-metrics-collector'
Default value: '/opt/puppetlabs/puppet-metrics-collector'
collection_frequency
Data type: Integer
The frequency to collect metrics in minutes. Default: '5'
Default value: 5
retention_days
Data type: Integer
The number of days to retain metrics. Default: '90'
Default value: 90
puppetserver_hosts
Data type: Array[String]
The list of puppetserver hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the puppetserver profile.
Default value: puppet_metrics_collector::hosts_with_pe_profile('master')
puppetserver_port
Data type: Integer
Port to connect to puppetserver on. Default: '8140'
Default value: 8140
puppetdb_metrics_ensure
Data type: String
Whether to enable or disable the collection of PuppetDB metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
puppetdb_hosts
Data type: Array[String]
The list of puppetdb hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the puppetdb profile.
Default value: puppet_metrics_collector::hosts_with_pe_profile('puppetdb')
puppetdb_port
Data type: Integer
Port to connect to puppetdb on. Default: '8081'
Default value: 8081
orchestrator_metrics_ensure
Data type: String
Whether to enable or disable the collection of Orchestrator metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
orchestrator_hosts
Data type: Array[String]
The list of orchestrator hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the orchestrator profile.
Default value: puppet_metrics_collector::hosts_with_pe_profile('orchestrator')
orchestrator_port
Data type: Integer
Port to connect to orchestrator on. Default: '8143'
Default value: 8143
console_metrics_ensure
Data type: String
Whether to enable or disable the collection of PE Console metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
console_hosts
Data type: Array[String]
The list of console hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the console profile.
Default value: puppet_metrics_collector::hosts_with_pe_profile('console')
console_port
Data type: Integer
Port to connect to console on. Default: '4433'
Default value: 4433
ace_metrics_ensure
Data type: String
Whether to enable or disable the collection of Ace metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
ace_hosts
Data type: Array[String]
The list of ace hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the ace profile.
Default value: puppet_metrics_collector::hosts_with_pe_profile('ace_server')
ace_port
Data type: Integer
Port to connect to ace on. Default: '44633'
Default value: 44633
bolt_metrics_ensure
Data type: String
Whether to enable or disable the collection of Bolt metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
bolt_hosts
Data type: Array[String]
The list of bolt hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the bolt profile.
Default value: puppet_metrics_collector::hosts_with_pe_profile('bolt_server')
bolt_port
Data type: Integer
Port to connect to bolt on. Default: '62658'
Default value: 62658
metrics_server_type
Data type: Optional[Enum['influxdb', 'graphite', 'splunk_hec']]
Default value: undef
metrics_server_db_name
Data type: Optional[String]
Default value: undef
override_metrics_command
Data type: Optional[String]
Default value: undef
activemq_metrics_ensure
Data type: String
Default value: 'absent'
activemq_hosts
Data type: Array[String]
Default value: []
activemq_port
Data type: Integer
Default value: 8161
puppetserver_excludes
Data type: Optional[Array[String]]
An Array of metrics to exclude from the puppetserver metrics collection.
Default value: undef
puppetdb_excludes
Data type: Optional[Array[String]]
An Array of metrics to exclude from the puppetdb metrics collection.
Default value: undef
orchestrator_excludes
Data type: Optional[Array[String]]
An Array of metrics to exclude from the orchestrator_excludes metrics collection.
Default value: undef
console_excludes
Data type: Optional[Array[String]]
An Array of metrics to exclude from the console_excludes metrics collection.
Default value: undef
ace_excludes
Data type: Optional[Array[String]]
An Array of metrics to exclude from the ace_excludes metrics collection.
Default value: undef
bolt_excludes
Data type: Optional[Array[String]]
An Array of metrics to exclude from the bolt_excludes metrics collection.
Default value: undef
activemq_excludes
Data type: Optional[Array[String]]
Collection of ActiveMQ metrics has been removed, but the parameters are left to avoid breaking upgrades
Default value: undef
metrics_server_hostname
Data type: Optional[String]
The hostname of the metrics server to send data to. Default: undef
Default value: undef
metrics_server_port
Data type: Optional[Integer]
(Deprecated) The port number of the metrics server to send data to. Default: undef
Default value: undef
puppet_metrics_collector::system
This class manages collect postgres and system metrics
Parameters
The following parameters are available in the puppet_metrics_collector::system
class:
system_metrics_ensure
output_dir
collection_frequency
retention_days
polling_frequency_seconds
manage_sysstat
manage_vmware_tools
vmware_tools_pkg
metrics_server_type
metrics_server_hostname
metrics_server_port
metrics_server_db_name
system_metrics_ensure
Data type: String
Whether to enable or disable the collection of System metrics. Valid values are 'present', and 'absent'. Default : 'present'
Default value: 'present'
output_dir
Data type: String
The directory to write the metrics to. Default: '/opt/puppetlabs/puppet-metrics-collector'
Default value: '/opt/puppetlabs/puppet-metrics-collector'
collection_frequency
Data type: Integer
The frequency to collect metrics in minutes. Default: '5'
Default value: 5
retention_days
Data type: Integer
The number of days to retain metrics. Default: '90'
Default value: 90
polling_frequency_seconds
Data type: Integer
Default value: 1
manage_sysstat
Data type: Boolean
Default value: false
manage_vmware_tools
Data type: Boolean
Default value: false
vmware_tools_pkg
Data type: String
Default value: 'open-vm-tools'
metrics_server_type
Data type: Optional[Enum['influxdb', 'graphite', 'splunk_hec']]
Default value: getvar('puppet_metrics_collector::metrics_server_type')
metrics_server_hostname
Data type: Optional[String]
Default value: getvar('puppet_metrics_collector::metrics_server_hostname')
metrics_server_port
Data type: Optional[Integer]
Default value: getvar('puppet_metrics_collector::metrics_server_port')
metrics_server_db_name
Data type: Optional[String]
Default value: getvar('puppet_metrics_collector::metrics_server_db_name')
Defined types
puppet_metrics_collector::collect
Creates systemd units for collecting a given metric
Parameters
The following parameters are available in the puppet_metrics_collector::collect
defined type:
ensure
Data type: Enum['present', 'absent']
Default value: 'present'
metrics_type
Data type: String
Default value: $title
metrics_command
Data type: String
Default value: undef
tidy_command
Data type: String
Default value: undef
env_vars
Data type: Optional[Hash]
Default value: undef
metric_ensure
Data type: String
Default value: 'present'
minute
Data type: String
Default value: '5'
puppet_metrics_collector::deprecated_parameter
The puppet_metrics_collector::deprecated_parameter class.
puppet_metrics_collector::pe_metric
A defined type to manage the configuration of tbe different metrics collection targets
Parameters
The following parameters are available in the puppet_metrics_collector::pe_metric
defined type:
metrics_type
metric_ensure
cron_minute
retention_days
hosts
metrics_port
metric_script_file
ssl
excludes
additional_metrics
override_metrics_command
metrics_server_type
env_vars
metrics_type
Data type: String
Default value: $title
metric_ensure
Data type: Enum['absent', 'present']
Default value: 'present'
cron_minute
Data type: String
Default value: '0/5'
retention_days
Data type: Integer
Default value: 90
hosts
Data type: Array[String]
Default value: ['127.0.0.1']
metrics_port
Data type: Integer
Default value: undef
metric_script_file
Data type: String
Default value: 'tk_metrics'
ssl
Data type: Boolean
Default value: true
excludes
Data type: Array[String]
Default value: puppet_metrics_collector::version_based_excludes($title)
additional_metrics
Data type: Array[Hash]
Default value: []
override_metrics_command
Data type: Optional[String]
Default value: undef
metrics_server_type
Data type: Optional[Enum['splunk_hec']]
Default value: undef
env_vars
Data type: Optional[Hash]
Default value: undef
puppet_metrics_collector::sar_metric
How often the target is requested to provide data, in seconds. Default: 1
Parameters
The following parameters are available in the puppet_metrics_collector::sar_metric
defined type:
collection_frequency
retention_days
polling_frequency_seconds
cron_minute
metrics_type
metric_ensure
metric_script_file
metrics_shipping_command
env_vars
collection_frequency
Data type: Integer
The frequency to collect metrics in minutes. Default: '5'
Default value: 5
retention_days
Data type: Integer
The number of days to retain metrics. Default: '90'
Default value: 90
polling_frequency_seconds
Data type: Integer
Default value: 1
cron_minute
Data type: String
The minute to run the cron job. Default: '0/5'
Default value: '0/5'
metrics_type
Data type: String
The string aide to identify the metrics type, this is used to create the metrics file name.
Default value: $title
metric_ensure
Data type: Enum['absent', 'present']
The ensure value for the metrics file. Default: 'present'
Default value: 'present'
metric_script_file
Data type: String
The script file to run to collect the metrics. Default: 'system_metrics'
Default value: 'system_metrics'
metrics_shipping_command
Data type: String
The parameter that defines the command for the remote shipping of metrics. Default: '$puppet_metrics_collector::system::metrics_shipping_command'
Default value: $puppet_metrics_collector::system::metrics_shipping_command
env_vars
Data type: Optional[Hash]
Default value: undef
Functions
puppet_metrics_collector::hosts_with_pe_profile
Type: Puppet Language
Function: hosts_with_pe_profile
Queries PuppetDB for hosts with the specified Puppet Enterprise profile. Used by this module to query Puppet Enterprise API endpoints. Parameters:
Results:
puppet_metrics_collector::hosts_with_pe_profile(Any $profile)
Function: hosts_with_pe_profile
Queries PuppetDB for hosts with the specified Puppet Enterprise profile. Used by this module to query Puppet Enterprise API endpoints. Parameters:
Results:
Returns: Any
$hosts: an array of certnames. or ['127.0.0.1'] when PuppetDB returns no hosts.
profile
Data type: Any
the short name of the Puppet Enterprise profile.
puppet_metrics_collector::to_yaml
Type: Ruby 4.x API
Description: Converts the content of the passed array or hash to YAML
puppet_metrics_collector::to_yaml(Hash $hash_or_array)
The puppet_metrics_collector::to_yaml function.
Returns: String
YAML representation of the passed array or hash
hash_or_array
Data type: Hash
puppet_metrics_collector::to_yaml(Array $hash_or_array)
The puppet_metrics_collector::to_yaml function.
Returns: String
YAML representation of the passed array or hash
hash_or_array
Data type: Array
puppet_metrics_collector::version_based_excludes
Type: Puppet Language
Function: version_based_excludes
Description: Generates a list of services to exlude based on the metrics type
puppet_metrics_collector::version_based_excludes(String[1] $metrics_type)
Function: version_based_excludes
Description: Generates a list of services to exlude based on the metrics type
Returns: Array[String]
excludes the list of services to exclude
metrics_type
Data type: String[1]
the service currently compiling metrics for
Change log
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.
v8.0.0 (2023-06-23)
Changed
- (SUP-3952) Remove Puppet 6 as a supported platform #195 (elainemccloskey)
- (SUP-3521) Remove legacy code #191 (m0dular)
Added
- (SUP-4210) Remove logic for EOL Postgres versions #197 (Sharpie)
- (SUP-4200) Puppet 8 compatibility #196 (MartyEwings)
- (SUP-4126) Fix file sync additional metrics #192 (m0dular)
v7.2.0 (2023-02-06)
Added
- (SUP-3535) Add more sar metrics to collect #176 (m0dular)
- (SUP-2115) Add postgres bloat size and percents #175 (m0dular)
- (SUP-3881) Add collection for PE console services #174 (m0dular)
- (SUP-2736) Documentation #170 (MartyEwings)
- (SUP-2736) Add puppet string documentation #168 (elainemccloskey)
Fixed
v7.1.1 (2022-09-29)
Fixed
- (SUP-3681) Check for valid status key in metrics #166 (m0dular)
- (SUP-2734) Collection to use FQDN to connect to the PuppetDB instance when runni… #163 (elainemccloskey)
v7.1.0 (2022-07-19)
Added
- (SUP-3472) Add file sync storage metric collection #160 (jarretlavallee)
Fixed
- (GH-154) Switch from change time to modify time #155 (MirandaStreeter)
v7.0.5 (2021-10-12)
Fixed
v7.0.4 (2021-09-30)
Fixed
v7.0.3 (2021-07-20)
Fixed
v7.0.2 (2021-07-19)
Fixed
v7.0.1 (2021-07-16)
Fixed
v7.0.0 (2021-07-02)
Changed
- (SUP-2493) Remove support for SysVinit operating systems #121 (jarretlavallee)
- (SUP-2493) Remove Puppet 5.x support #120 (jarretlavallee)
- (GH-108) Disable sysstat management by default #116 (jarretlavallee)
- Remove collection of AMQ metrics #111 (m0dular)
- SUP-2192 Migration from Cron, to SystemD timers for Database Maintenance #99 (m0dular)
Added
- Addition of SLES 12 Test Platform #125 (MartyEwings)
- Add PuppetDB message queue metrics #112 (jarretlavallee)
- (SUP-1969) Enable metrics shipping for all system types #94 (jarretlavallee)
Fixed
- Rework namevar of defined types #114 (m0dular)
- (GH-95) Use -I with pidstat with system_processes #96 (jarretlavallee)
v6.6.0 (2021-06-02)
Added
- Add PuppetDB Jetty thread metrics #103 (jarretlavallee)
- Expose additional_metrics for each service #102 (jarretlavallee)
- Add concurrent-depth to PuppetDB metrics #101 (jarretlavallee)
v6.5.0 (2021-04-19)
Added
- (PE-31763) Remove the dependency on stdlib #90 (jarretlavallee)
v6.4.1 (2021-04-08)
Fixed
v6.4.0 (2021-04-07)
Added
- (PE-31705) Re-enable remote metric collection #85 (Sharpie)
- (GH-81) Enable client ssl cert for metrics #82 (jarretlavallee)
Fixed
- Clean up temp files when metrics_tidy exits cleanly #86 (brontitall)
6.3.0 (2021-02-16)
Added
Fixed
6.2.0 (2020-12-29)
Added
- (SUP-2058) Gather metrics from pe-postgresql #71 (Sharpie)
- (SUP-2054) Add VMware metrics collection #68 (Sharpie)
Fixed
- (GH-74) Return null when a mbean is missing #76 (jarretlavallee)
- (gh-73) Append - to the metric command for json2timeseriesdb #75 (jarretlavallee)
- Fix duplicate declaration of common files #70 (Sharpie)
- Fix ensure => absent for metrics #69 (Sharpie)
6.1.1 (2020-09-14)
Fixed
- Getting orchestrator paramaters to use correct values, not puppetserver's #65 (MirandaStreeter)
- Allow for coalescing boolean values #63 (jarretlavallee)
6.1.0 (2020-07-16)
Added
- Reduce the size of files on disk #61 (jarretlavallee)
6.0.0 (2020-03-20)
Added
- (PE-28451) switch from the v1 to v2 metrics api #57 (tkishel)
- Better error handling in tidy script #52 (m0dular)
- (PIE-178) Print metrics as line-delimited JSON #44 (Sharpie)
- (maint) normalize json2graphite.rb and json2timeseriesdb #37 (tkishel)
- (PE-27794) collect data from ace and bolt (puma) services #36 (tkishel)
- (SLV-631) add process tracking #35 (RandellP)
Fixed
- (bug) Use ARGV instead of ARGF #51 (tkishel)
- Allow for handling multiple hashes with STDIN #45 (jarretlavallee)
- (SLV-767) Updated measurement tagging #43 (RandellP)
- (SLV-771) Fix bug where process data is missed #42 (RandellP)
- (bug) use full path to puppet in puma_metrics #38 (tkishel)
5.3.0 (2019-12-11)
Added
- (SLV-688) send script errors to the output file #32 (RandellP)
- (SLV-672) Add system class to manage system metric #30 (RandellP)
- Allow for excluding data from the metrics files #29 (jarretlavallee)
- (SLV-653) Add a script for generating system stats #28 (RandellP)
- Skip versioncmp when pe_server_version is missing #23 (Sharpie)
Fixed
- Update the system metrics timestamp key #31 (jarretlavallee)
- Change STDOUT.write to STDOUT.puts #27 (m0dular)
- Remove 127.0.0.1 special case naming #26 (reidmv)
5.2.0 (2019-09-09)
Added
- (PIE-51) Ability to define a metrics server to ship to #19 (HelenCampbell)
5.1.2 (2019-02-26)
5.1.1 (2019-01-25)
Fixed
5.1.0 (2018-12-17)
Added
- Automate configuration of _hosts parameters and clarify documentation #5 (tkishel)
- Sup-346 update to include puppetserver metrics for versions \< 2018.1.0 #3 (daniel5119)
2.7.0 (2018-04-13)
1.9.0 (2018-04-13)
5.0.1 (2018-04-06)
5.0.0 (2018-04-05)
4.6.0 (2017-11-13)
4.5.0 (2017-10-19)
4.4.2 (2017-10-19)
4.4.1 (2017-06-13)
4.4.0 (2017-06-13)
4.3.0 (2017-06-08)
4.2.2 (2017-06-08)
4.2.1 (2017-05-23)
4.2.0 (2017-04-28)
4.1.0 (2017-04-17)
4.0.0 (2017-04-07)
3.0.1 (2017-04-06)
3.0.0 (2017-04-04)
2.0.0 (2017-01-13)
1.1.1 (2016-12-05)
1.1.0 (2016-12-02)
1.0.4 (2016-11-18)
2016.5.0 (2016-11-16)
1.0.3 (2016-11-01)
2016.4.1 (2016-10-12)
1.0.2 (2016-09-07)
1.0.1 (2016-09-07)
1.0.0 (2016-08-22)
2016.4.0 (2016-08-16)
2016.3.0-rc0 (2016-08-12)
2016.2.1 (2016-06-15)
2016.2.0 (2016-06-01)
2016.2.0-rc0 (2016-04-20)
* This Changelog was automatically generated by github_changelog_generator
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2016 Nick Walker Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Quality checks
We run a couple of automated scans to help you assess a module’s quality. Each module is given a score based on how well the author has formatted their code and documentation and select 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.
Malware scan results
The malware detection service on Puppet Forge is an automated process that identifies known malware in module releases before they’re published. It is not intended to replace your own virus scanning solution.
Learn more about malware scans- Module name:
- puppetlabs-puppet_metrics_collector
- Module version:
- 8.0.0
- Scan initiated:
- June 23rd 2023, 4:33:10
- Detections:
- 0 / 59
- Scan stats:
- 59 undetected
- 0 harmless
- 0 failures
- 0 timeouts
- 0 malicious
- 0 suspicious
- 16 unsupported
- Scan report:
- View the detailed scan report