Skip to content

Latest commit

 

History

History
885 lines (453 loc) · 27.1 KB

REFERENCE.md

File metadata and controls

885 lines (453 loc) · 27.1 KB

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • puppet_metrics_collector::service::ace: Collects ace metrics
  • puppet_metrics_collector::service::bolt: Collects bolt metrics
  • puppet_metrics_collector::service::console: Collects console metrics
  • puppet_metrics_collector::service::orchestrator: Collects orchestrator metrics
  • puppet_metrics_collector::service::puppetdb: Collects puppetdb metrics
  • puppet_metrics_collector::service::puppetserver: Collect puppetserver metrics
  • puppet_metrics_collector::system::postgres: Collects postgres Metrics
  • puppet_metrics_collector::system::processes: Collects System Processes Metrics
  • puppet_metrics_collector::system::sar: Collects System CPU Metrics
  • puppet_metrics_collector::system::vmware: Collects System vmware Metrics

Defined types

Functions

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

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

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

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

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