prometheus_node_exporter
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
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'psreed-prometheus_node_exporter', '1.0.1'
Learn more about managing modules with a PuppetfileDocumentation
prometheus_node_exporter
Puppet module to install and configure Prometheus Node Exporter
See REFERENCE.md
for parameter references.
extra_confguration_options
and handling parameters with an optional [no-]
prefix
--web.config.file
and --web.listen-address
have explicit module parameters and should not be included with extra_configuration_options
.
Other parameters supported by the node_exporter
binary can be added using the extra_configuration_options
module parameter.
Parameters with an optional [no-]
prefix flag (--[no-]collector.zfs
, for exmpale) are supplied to the module via true
/false
values.
For example:
--no-collector.zfs
would be represented using '--collector.zfs' => false
in Puppet DSL or '--collector.xfs': false
in Hiera YAML.
--collector.zfs
would be represented using '--collector.zfs' => true
in Puppet DSL or '--collector.xfs': true
in Hiera YAML.
Hiera:
All parameters are supported for automatic lookup from Hiera.
Example:
prometheus_node_exporter::basic_auth_enabled: true
prometheus_node_exporter::basic_auth_hash_salt: DontUseThisHashSalt123
prometheus_node_exporter::basic_auth_password: DontUseThisPassword
prometheus_node_exporter::tls_use_puppet_certificates: true
prometheus_node_exporter::extra_configuration_options:
- '--collector.textfile.directory': /var/lib/node_exporter/textfile
'--collector.xfs': false
'--collector.zfs': false
'--log.level': debug
Contributing
Pull requests from forks are reviewed and accepted as time allows. Please use the associated Issues section in Github to report any issues to be corrected.
Reference
Table of Contents
Classes
prometheus_node_exporter
: Puppet module to install and configure Prometheus Node Exporter
Classes
prometheus_node_exporter
Puppet module to install and configure Prometheus Node Exporter
Examples
include prometheus_node_exporter
class { 'prometheus_node_exporter':
basic_auth_enabled => true,
}
Parameters
The following parameters are available in the prometheus_node_exporter
class:
basic_auth_enabled
basic_auth_hash_salt
basic_auth_hash_strength
basic_auth_password
basic_auth_username
binary_symlink
extra_configuration_options
manage_installation
manage_service_user
manage_selinux_requirements
manage_systemd_service
service_enabled
service_ensure
service_group
service_username
source_archive_base
systemd_service_file
systemd_service_name
target_folder_location
tls_enabled
tls_certificate_file
tls_private_key_file
tls_use_puppet_certificates
version
web_configuration_folder
web_configuration_file
web_listen_address
basic_auth_enabled
Data type: Boolean
Determines if basic web authentication is used
Default value: true
basic_auth_hash_salt
Data type: Sensitive[String]
Sets the hash salt for basic web based authentication. Exactly 22 characters, no symbols
Default value: Sensitive('0123456789AbCdEfGhIjKl')
basic_auth_hash_strength
Data type: String
Strength of the hash, number represented as string between 4 and 31 inclusive
Default value: '10'
basic_auth_password
Data type: Sensitive[String]
Sets the password for basic web based authentication
Default value: Sensitive('<password>')
basic_auth_username
Data type: String
Sets the username for basic web based authentication
Default value: 'prometheus'
binary_symlink
Data type: String
Location to symlink binary for execution
Default value: '/usr/local/bin/node_exporter'
extra_configuration_options
Data type: Hash
A hash of additional configuration items to add to the service start command. Example: { '--collector.textfile.directory' => '/var/lib/node_exporter/textfile/' }
Default value: {}
manage_installation
Data type: Boolean
Manage the installation from tarball sourc
Default value: true
manage_service_user
Data type: Boolean
Manage the local user to run the service as
Default value: true
manage_selinux_requirements
Data type: Boolean
Manage SE Linux to allow node exporter to run
Default value: true
manage_systemd_service
Data type: Boolean
Manage the configuration of the systemd service definition
Default value: true
service_enabled
Data type: Boolean
Set if systemd service is enabled at boot time
Default value: true
service_ensure
Data type: String
Value for systemd service configuration: running, stopped, etc.
Default value: running
service_group
Data type: String
The local group to run the node_exporter service
Default value: 'node_exporter'
service_username
Data type: String
The local username to run the node_exporter service
Default value: 'node_exporter'
source_archive_base
Data type: String
Base location for source archive
Default value: 'https://github.com/prometheus/node_exporter/releases/download'
systemd_service_file
Data type: String
File location for systemd service definition
Default value: '/etc/systemd/system/node_exporter.service'
systemd_service_name
Data type: String
Service name for systemd service definition
Default value: 'node_exporter'
target_folder_location
Data type: String
Location on filesystem to for archive extraction & program location
Default value: '/opt'
tls_enabled
Data type: Boolean
Determines whether to use TLS/SSL for web connections
Default value: true
tls_certificate_file
Data type: String
Location on filesystem of public certificate file for TLS communications
Default value: '/etc/prometheus_node_exporter/tlsCertificate.crt'
tls_private_key_file
Data type: String
Location on filesystem of private key file for TLS communications
Default value: '/etc/prometheus_node_exporter/tlsCertificate.key'
tls_use_puppet_certificates
Data type: Boolean
Determines whether to use the Puppet agent certificates for TLS
- If set true, will use Puppet agent certificate files for TLS
- If set false, will use $tls_certificate_file and $tls_private_key_file
Default value: true
version
Data type: String
Version of Prometheus Node Exporter to download, install and configure
Default value: '1.8.1'
web_configuration_folder
Data type: String
Filesystem folder location for Node Exporter web configuration
Default value: '/etc/prometheus_node_exporter'
web_configuration_file
Data type: String
Filename for the web configuration file in the web_configuration_folder
Default value: 'configuration.yml'
web_listen_address
Data type: String
Address:port combination to bind on for web listener
Default value: ':9100'
Dependencies
- puppet/archive (>=7.0.0 < 8.0.0)
- puppetlabs/concat (>=9.0.0 < 10.0.0)
- puppetlabs/stdlib (>=9.0.0 < 10.0.0)