puppet_operational_dashboards
: Installs Telegraf, InfluxDB, and Grafana to collect and display Puppet metricspuppet_operational_dashboards::enterprise_infrastructure
: Installs dependancies for Operational dashboards on PE infrastructure componentspuppet_operational_dashboards::profile::dashboards
: Installs Grafana and several dashboards to display Puppet metrics. Included via the base class.puppet_operational_dashboards::profile::foss_postgres_access
: Allows Telegraf to connect and collect metrics from postgres nodespuppet_operational_dashboards::profile::postgres_access
: Allows Telegraf to connect and collect metrics from postgres nodespuppet_operational_dashboards::telegraf::agent
: Installs and configures Telegraf to query hosts in a Puppet infrastructure. Included by the base class
puppet_operational_dashboards::telegraf::config
: Defined type to create Telegraf configurations for a given service
puppet_operational_dashboards::hosts_with_profile
: function used to determine hosts with a profile classpuppet_operational_dashboards::pe_profiles_on_host
: function used to determine hosts with a Puppet Enterprise profile
puppet_operational_dashboards::load_metrics
: A plan created with bolt plan new.puppet_operational_dashboards::provision_dashboard
: A plan to provision a non-SSL operational dashboards node
Installs Telegraf, InfluxDB, and Grafana to collect and display Puppet metrics
include puppet_operational_dashboards
class {'puppet_operational_dashboards':
manage_influxdb => false,
influxdb_host => '<influxdb_fqdn>',
}
The following parameters are available in the puppet_operational_dashboards
class:
manage_influxdb
influxdb_host
influxdb_port
initial_org
initial_bucket
influxdb_bucket_retention_rules
influxdb_token
telegraf_token_name
manage_telegraf
manage_telegraf_token
use_ssl
use_system_store
influxdb_token_file
telegraf_token
include_pe_metrics
manage_system_board
template_format
Data type: Boolean
Whether to manage installation and configuration of InfluxDB.
Default value: true
Data type: String
FQDN of the InfluxDB host.
Default value: lookup(influxdb::host, undef, undef, $facts['networking']['fqdn'])
Data type: Integer
Port used by the InfluxDB service.
Default value: lookup(influxdb::port, undef, undef, 8086)
Data type: String
Name of the InfluxDB organization to configure.
Default value: lookup(influxdb::initial_org, undef, undef, 'puppetlabs')
Data type: String
Name of the InfluxDB bucket to configure and query.
Default value: lookup(influxdb::initial_bucket, undef, undef, 'puppet_data')
Data type: Array
Value for the initial InfluxDB bucket retention rules, Values are the same as in the influx_bucket type of the InfluxDB module.
Default value: [{ 'type' => 'expire', 'everySeconds' => 7776000, 'shardGroupDurationSeconds' => 604800 }]
Data type: Optional[Sensitive[String]]
InfluxDB admin token in Sensitive format. See the puppetlabs/influxdb documentation for more information about this token.
Default value: lookup(influxdb::token, undef, undef, undef)
Data type: String
Name of the token to retrieve from InfluxDB if not given $telegraf_token.
Default value: 'puppet telegraf token'
Data type: Boolean
Whether to manage installation and configuration of Telegraf.
Default value: true
Data type: Boolean
Whether to create and manage a Telegraf token with permissions to query buckets in the default organization.
Default value: true
Data type: Boolean
Whether to use SSL when querying InfluxDB.
Default value: true
Data type: Boolean
Whether to use the system CA bundle.
Default value: lookup(influxdb::use_system_store, undef, undef, false)
Data type: String
Location on disk of an InfluxDB admin token. This file is written to by the influxdb class during installation and read by the type and providers, as well Deferred functions in this module.
Default value:
lookup(influxdb::token_file, undef, undef, $facts['identity']['user'] ? {
'root' => '/root/.influxdb_token',
default => "/home/${facts['identity']['user']}/.influxdb_token"
})
Data type: Optional[Sensitive[String]]
Telegraf token in Sensitive format.
Default value: undef
Data type: Boolean
Whether to include Filesync and Orchestrator dashboards
Default value:
$settings::module_groups ? {
/pe_only/ => true,
default => false
Data type: Boolean
Whether the System Performance dashboard should be added to grafana
Default value: true
Data type: Enum['yaml','toml']
Template format to use for puppet template toml or yaml config
Default value: 'toml'
When applied to an appropriate node group this class applies the toml gem and database access On appropriate infrastructure nodes in PE
include puppet_operational_dashboards::enterprise_infrastructure
The following parameters are available in the puppet_operational_dashboards::enterprise_infrastructure
class:
Data type: Array[String]
Array of PE profiles on the node with this class applied.
Default value: puppet_operational_dashboards::pe_profiles_on_host()
Data type: Enum['yaml','toml']
Template format to use for puppet template toml or yaml config
Default value: 'toml'
Installs Grafana and several dashboards to display Puppet metrics. Included via the base class.
include puppet_operational_dashboards
class {'puppet_operational_dashboards::profile::dashboards':
token => '<my_sensitive_token>',
influxdb_host => '<influxdb_fqdn>',
influxdb_port => 8086,
initial_bucket => '<my_bucket>',
}
The following parameters are available in the puppet_operational_dashboards::profile::dashboards
class:
token
grafana_host
grafana_port
grafana_use_ssl
manage_grafana_ssl
grafana_cert_file
grafana_key_file
grafana_cert_file_source
grafana_key_file_source
grafana_timeout
grafana_password
grafana_version
grafana_datasource
grafana_install
use_ssl
use_system_store
manage_grafana
manage_grafana_repo
influxdb_host
influxdb_port
influxdb_bucket
telegraf_token_name
influxdb_token_file
provisioning_datasource_file
include_pe_metrics
manage_system_board
system_dashboard_version
Data type: Optional[Sensitive[String]]
Token in Sensitive format used to query InfluxDB. The token must grant priviledges to query the associated bucket in InfluxDB
Default value: $puppet_operational_dashboards::telegraf_token
Data type: String
FQDN of the Grafana host.
Default value: $facts['networking']['fqdn']
Data type: Integer
Port used by the Grafana service.
Default value: 3000
Data type: Boolean
Enable use of HTTPS/SSL for Grafana.
Default value: false
Data type: Boolean
Whether to manage the SSL certificate files when using the grafana_use_ssl parameter.
Default value: true
Data type: Stdlib::Absolutepath
SSL certificate file to use when 'grafana_use_ssl' and 'manage_grafana' are enabled.
Default value: '/etc/grafana/client.pem'
Data type: Stdlib::Absolutepath
SSL private key file to use when 'grafana_use_ssl' and 'manage_grafana' are enabled.
Default value: '/etc/grafana/client.key'
Data type: Stdlib::Absolutepath
SSL certificate file to use as the source for the grafana_cert_file parameter.
Default value: "/etc/puppetlabs/puppet/ssl/certs/${trusted['certname']}.pem"
Data type: Stdlib::Absolutepath
SSL certificate file to use as the source for the grafana_key_file parameter.
Default value: "/etc/puppetlabs/puppet/ssl/private_keys/${trusted['certname']}.pem"
Data type: Integer
How long to wait for the Grafana service to start.
Default value: 10
Data type: Sensitive[String]
Grafana admin password in Sensitive format.
Default value: Sensitive('admin')
Data type: String
Version of the Grafana package to install.
Default value: '8.5.27'
Data type: String
Name to use for the Grafana datasource.
Default value: 'influxdb_puppet'
Data type: String
Method to use for installing Grafana.
Default value:
$facts['os']['family'] ? {
/(RedHat|Debian)/ => 'repo',
default => 'package'
Data type: Boolean
Whether to use SSL when querying InfluxDB.
Default value: $puppet_operational_dashboards::use_ssl
Data type: Boolean
Whether to use the system CA bundle.
Default value: $puppet_operational_dashboards::use_system_store
Data type: Boolean
Whether to manage installation and configuration of Grafana.
Default value: true
Data type: Boolean
Whether to manage the Grafana repository definition.
Default value: true
Data type: String
FQDN of the InfluxDB host.
Default value: $puppet_operational_dashboards::influxdb_host
Data type: Integer
Port used by the InfluxDB service.
Default value: $puppet_operational_dashboards::influxdb_port
Data type: String
Name of the InfluxDB bucket to query.
Default value: $puppet_operational_dashboards::initial_bucket
Data type: String
Name of the token to retrieve from InfluxDB if not given $token
Default value: $puppet_operational_dashboards::telegraf_token_name
Data type: Stdlib::Absolutepath
Location on disk of an InfluxDB admin token. This token is used in this class in a Deferred function call to retrieve a Telegraf token if $token is unset
Default value: $puppet_operational_dashboards::influxdb_token_file
Data type: Stdlib::Absolutepath
Location on disk to store datasource definition
Default value: '/etc/grafana/provisioning/datasources/influxdb.yaml'
Data type: Boolean
Whether to include Filesync and Orchestrator dashboards
Default value: $puppet_operational_dashboards::include_pe_metrics
Data type: Boolean
Whether the System Performance dashboard should be created
Default value: $puppet_operational_dashboards::manage_system_board
Data type: Enum['v1', 'v2', 'all']
Version of the system dashboard to manage. v2 is compatible with puppet_metrics_collector version 7 and up
Default value: 'v2'
Allows Telegraf to connect and collect metrics from postgres nodes
include puppet_operational_dashboards::profile::foss_postgres_access
The following parameters are available in the puppet_operational_dashboards::profile::foss_postgres_access
class:
Data type: Array
A list of FQDNs running Telegraf to allow access to
Default value: puppet_operational_dashboards::hosts_with_profile('Puppet_operational_dashboards::Telegraf::Agent')
Data type: String
Username for the Telegraf client to use in the postgres connection string
Default value: 'telegraf'
Allows Telegraf to connect and collect metrics from postgres nodes
include puppet_operational_dashboards::profile::postgres_access
The following parameters are available in the puppet_operational_dashboards::profile::postgres_access
class:
Data type: Array
A list of FQDNs running Telegraf to allow access to
Default value: puppet_operational_dashboards::hosts_with_profile('Puppet_operational_dashboards::Telegraf::Agent')
Installs and configures Telegraf to query hosts in a Puppet infrastructure. Included by the base class
include puppet_operational_dashboards
class {'puppet_operational_dashboards::telegraf::agent':
token => '<sensitive_telegraf_token>',
}
The following parameters are available in the puppet_operational_dashboards::telegraf::agent
class:
token
influxdb_host
influxdb_port
influxdb_org
influxdb_bucket
use_ssl
use_system_store
manage_ssl
manage_repo
manage_archive
manage_user
ssl_cert_file
ssl_key_file
ssl_ca_file
puppet_ssl_cert_file
puppet_ssl_key_file
puppet_ssl_ca_file
insecure_skip_verify
version
archive_location
archive_install_dir
collection_method
collection_interval
puppetserver_hosts
puppetdb_hosts
postgres_hosts
orchestrator_hosts
profiles
local_services
token_name
influxdb_token_file
http_timeout_seconds
include_pe_metrics
telegraf_user
telegraf_postgres_password
postgres_port
postgres_options
template_format
Data type: Optional[Sensitive[String]]
Telegraf token in Sensitive format.
Default value: $puppet_operational_dashboards::telegraf_token
Data type: String
FQDN of the InfluxDB host.
Default value: $puppet_operational_dashboards::influxdb_host
Data type: Integer
Port used by the InfluxDB service.
Default value: $puppet_operational_dashboards::influxdb_port
Data type: String
Name of the InfluxDB organization.
Default value: $puppet_operational_dashboards::initial_org
Data type: String
Name of the InfluxDB bucket to query.
Default value: $puppet_operational_dashboards::initial_bucket
Data type: Boolean
Whether to use SSL when querying InfluxDB.
Default value: $puppet_operational_dashboards::use_ssl
Data type: Boolean
Whether to use the system CA bundle.
Default value: $puppet_operational_dashboards::use_system_store
Data type: Boolean
Whether to manage Telegraf ssl configuration.
Default value: true
Data type: Boolean
Whether to install Telegraf from a repository.
Data type: Boolean
Whether to install Telegraf from an archive source.
Default value: !$manage_repo
Data type: Boolean
Whether to manage the telegraf user when installing from archive.
Default value: true
Data type: Stdlib::Absolutepath
SSL certificate to be used by the telegraf service.
Default value: "/etc/puppetlabs/puppet/ssl/certs/${trusted['certname']}.pem"
Data type: Stdlib::Absolutepath
Private key used in the CSR for the certificate specified by $ssl_cert_file.
Default value: "/etc/puppetlabs/puppet/ssl/private_keys/${trusted['certname']}.pem"
Data type: Stdlib::Absolutepath
CA certificate issued by the CA which signed the certificate specified by $ssl_cert_file.
Default value: '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
Data type: Stdlib::Absolutepath
SSL certificate to be used by the telegraf inputs.
Default value: "/etc/puppetlabs/puppet/ssl/certs/${trusted['certname']}.pem"
Data type: Stdlib::Absolutepath
Private key used in the CSR for the certificate specified by $puppet_ssl_cert_file.
Default value: "/etc/puppetlabs/puppet/ssl/private_keys/${trusted['certname']}.pem"
Data type: Stdlib::Absolutepath
CA certificate issued by the CA which signed the certificate specified by $puppet_ssl_cert_file.
Default value: '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
Data type: Boolean
Skip verification of SSL certificate.
Default value: true
Data type: String
Version of the Telegraf package to install.
Data type: String
URL containing an archive source for the telegraf package. Defaults to downloading $version from dl.influxdata.com
Default value: "https://dl.influxdata.com/telegraf/releases/telegraf-${version.split('-')[0]}_linux_amd64.tar.gz"
Data type: String
Directory to install $archive_location to.
Default value: '/opt/telegraf'
Data type: Enum['all', 'local', 'none']
Determines how metrics will be collected. 'all' will query all Puppet services across all Puppet infrastructure hosts from the node with this class applied. 'local' will query all Puppet services on the node with this class applied. 'none' will not query any services from the node with this class applied.
Default value: 'all'
Data type: String
How frequently to collect metrics.
Default value: '10m'
Data type: Array
Array of Puppet server hosts to collect metrics from. FOSS users need to supply a list of FQDNs.
Default value: puppet_operational_dashboards::hosts_with_profile('Puppet_enterprise::Profile::Master')
Data type: Array
Array of PuppetDB hosts to collect metrics from. FOSS users need to supply a list of FQDNs.
Default value: puppet_operational_dashboards::hosts_with_profile('Puppet_enterprise::Profile::Puppetdb')
Data type: Array
Array of Postgres hosts to collect metrics from. FOSS users need to supply a list of FQDNs.
Default value: puppet_operational_dashboards::hosts_with_profile('Puppet_enterprise::Profile::Database')
Data type: Array
Array of Orchestrator hosts to collect metrics from. FOSS users need to supply a list of FQDNs.
Default value: puppet_operational_dashboards::hosts_with_profile('Puppet_enterprise::Profile::Orchestrator')
Data type: Array[String]
Array of PE profiles on the node with this class applied. Used when collection_method is set to 'local'. FOSS users can use the $local_services parameter.
Default value: puppet_operational_dashboards::pe_profiles_on_host()
Data type: Array[String]
Array of FOSS services to collect from when collection_method is set to 'local'.
Default value: []
Data type: String
Name of the token to retrieve from InfluxDB if not given $token
Default value: $puppet_operational_dashboards::telegraf_token_name
Data type: String
Location on disk of an InfluxDB admin token. This token is used in this class in a Deferred function call to retrieve a Telegraf token if $token is unset
Default value: $puppet_operational_dashboards::influxdb_token_file
Data type: Integer[1]
Timeout for HTTP Telegraf inputs. Might be usefull in huge environments with slower API responses
Default value: 5
Data type: Boolean
Whether to include Filesync and Orchestrator dashboards
Default value: $puppet_operational_dashboards::include_pe_metrics
Data type: String
Username for the Telegraf client to use in the postgres connection string
Default value: 'telegraf'
Data type: Optional[Sensitive[String]]
Optional Sensitive password for the Telegraf client to use in the postgres connection string
Default value: undef
Data type: Integer
Port for the Telegraf client to use in the postgres connection string
Default value: 5432
Data type: Hash
Hash of options for the Telegraf client to use as connection parameters in the postgres connection string
Default value:
{
'sslmode' => 'verify-full',
'sslkey' => '/etc/telegraf/puppet_key.pem',
'sslcert' => '/etc/telegraf/puppet_cert.pem',
'sslrootcert' => '/etc/telegraf/puppet_ca.pem',
}
Data type: Enum['yaml','toml']
Template format to use for puppet template toml or yaml config
Default value: $puppet_operational_dashboards::template_format
Defined type to create Telegraf configurations for a given service
The following parameters are available in the puppet_operational_dashboards::telegraf::config
defined type:
Data type: String
Name of the service to query. Is the title of the resource.
Default value: $title
Data type: Enum['https', 'http']
Protocol to use in requests, either https or http
Data type: Array[String[1]]
Array of hosts running the service
Data type: Enum['present', 'absent']
Whether the resource should be present or absent
Default value: 'present'
Data type: Integer[1]
Timeout for HTTP Telegraf inputs. Might be usefull in huge environments with slower API responses
Data type: Enum['yaml','toml']
Template format to use for puppet template toml or yaml config
Default value: 'toml'
Type: Puppet Language
Queries PuppetDB for hosts with the specified profile. Used by this module to identify hosts with Puppet Enterprise API endpoints and Telegraf hosts
Queries PuppetDB for hosts with the specified profile. Used by this module to identify hosts with Puppet Enterprise API endpoints and Telegraf hosts
Returns: Array[String]
An array of certnames from the query
Data type: String
The full name of the profile to query.
Type: Puppet Language
Queries PuppetDB for Puppet Enterprise profile on the node including the class. Used by this module to identify Puppet Enterprise API endpoints on the node.
Queries PuppetDB for Puppet Enterprise profile on the node including the class. Used by this module to identify Puppet Enterprise API endpoints on the node.
Returns: Array[String]
An array of PE profiles representing the Puppet server, PDB, and postgres services
The summary sets the description of the plan that will appear in 'bolt plan show' output. Bolt uses puppet-strings to parse the summary and parameters from the plan.
The following parameters are available in the puppet_operational_dashboards::load_metrics
plan:
targets
support_script_file
metrics_dir
dest_dir
cleanup_metrics
influxdb_org
influxdb_bucket
influxdb_port
grafana_datasource
telegraf_token
token_file
conf_dir
retention_rules
telegraf_process
token
Data type: TargetSpec
The targets to run on.
Data type: Optional[String]
Path to a support script tarball
Default value: undef
Data type: Optional[String]
Path to the 'metrics' directory from a PE support script
Default value: undef
Data type: String
Directory to upload $metrics_dir to
Default value: '/tmp'
Data type: String
Whether to delete metrics after processing
Default value: 'true'
Data type: String
Name of the InfluxDB organization to configure. Defaults to 'puppetlabs'
Default value: 'puppetlabs'
Data type: String
Name of the InfluxDB bucket to configure and query. Defaults to 'puppet_data'
Default value: 'influxdb_puppet'
Data type: Integer
Port used by the InfluxDB service. Defaults to the value of influxdb::port, or 8086 if unset
Default value: 8086
Data type: String
Name of the Grafana datasource. Must match the name of the InfluxDB bucket
Default value: $influxdb_bucket
Data type: String
Name of the token to retrieve from InfluxDB. Defaults to 'puppet telegraf token'
Default value: 'puppet telegraf token'
Data type: String
Location on disk of an InfluxDB admin token. This file is written to by the influxdb class during installation and read by the type and providers, as well Deferred functions in this module.
Default value: '/root/.influxdb_token'
Data type: String
Directory to upload Telegraf configuration files to
Default value: '/tmp/telegraf'
Data type: Array[Hash]
Default value:
[{
'type' => 'expire',
'everySeconds' => 3456000,
'shardGroupDurationSeconds' => 604800,
}]
Data type: Enum['local', 'remote']
Default value: 'remote'
Data type: Optional[String]
Default value: undef
A plan to provision a non-SSL operational dashboards node
The following parameters are available in the puppet_operational_dashboards::provision_dashboard
plan:
Data type: TargetSpec
The targets to run on.