Skip to content

Latest commit

 

History

History
441 lines (248 loc) · 9.24 KB

REFERENCE.md

File metadata and controls

441 lines (248 loc) · 9.24 KB

Reference

Table of Contents

Classes

Defined types

Classes

nhc

Manage Node Health Check (NHC)

Examples

include ::nhc

Parameters

The following parameters are available in the nhc class:

ensure

Data type: Enum['present', 'absent']

State of NHC resources

Default value: 'present'

install_method

Data type: Enum['repo','package','source']

The method used to install NHC. Using repo will require the Yumrepo resource if repo_name is defined.

Default value: 'source'

package_ensure

Data type: Optional[String]

The ensure state of package if using install_method of repo or package.

Default value: undef

version

Data type: String

The version of NHC to install.

Default value: '1.4.3'

package_release

Data type: String

The package release NHC to install. Not used if install_method is source.

Default value: '1'

install_source

Data type: Optional[Variant[Stdlib::HTTPUrl,Stdlib::HTTPSUrl]]

The source of install. For install_method of package this is URL to package For install_method of source this is git source URL

Default value: undef

package_name

Data type: Optional[String]

Name of the NHC package, not used with install_method of source.

Default value: undef

repo_name

Data type: Optional[String]

The repo name for NHC, only used with install_method of repo.

Default value: undef

source_dependencies

Data type: Array

The package dependencies for source install.

Default value: ['automake','make']

libexec_dir

Data type: Stdlib::Absolutepath

Location for libexec directory, OS dependent.

Default value: '/usr/libexec'

checks

Data type: Variant[Hash, Array]

NHC checks for nhc.conf

Default value: []

settings

Data type: Hash

Settings to add to nhc.conf

Default value: {}

settings_host

Data type: Hash

Host specific settings for nhc.conf

Default value: {}

config_overrides

Data type: Hash

Settings to add to /etc/sysconfig/nhc

Default value: {}

detached_mode

Data type: Boolean

Value for DETACHED_MODE

Default value: false

detached_mode_fail_nodata

Data type: Boolean

Value for DETACHED_MODE_FAIL_NODATA

Default value: false

program_name

Data type: String

Value for NAME

Default value: 'nhc'

conf_dir

Data type: Stdlib::Absolutepath

Path to NHC configuration directry

Default value: '/etc/nhc'

conf_file

Data type: Stdlib::Absolutepath

Path for this configuration file

Default value: '/etc/nhc/nhc.conf'

include_dir

Data type: Stdlib::Absolutepath

Path to directory containing NHC checks

Default value: '/etc/nhc/scripts'

log_file

Data type: Stdlib::Absolutepath

Path to log file

Default value: '/var/log/nhc.log'

sysconfig_path

Data type: Stdlib::Absolutepath

Path to sysconfig file

Default value: '/etc/sysconfig/nhc'

manage_logrotate

Data type: Boolean

Boolean that sets if logrotate resources should be managed

Default value: true

log_rotate_every

Data type: String

Frequency of logrotation

Default value: 'weekly'

custom_checks

Data type: Hash

Hash passed to nhc::custom_check

Default value: {}

nhc::config

private class

nhc::install

private class

Defined types

nhc::conf

Manage NHC configurations

Examples

Define additional NHC configuration
nhc::conf { 'nhc-cron':
  settings          => { 'NHC_RM' => 'slurm' },
  settings_host     => { 'c0001' => { 'FOO' => 'bar' }},
  checks            => { '*' => ['check_fs_free /tmp 10%'] },
  config_overrides  => { 'HOSTNAME' => '"$HOSTNAME_S"' },
}

Parameters

The following parameters are available in the nhc::conf defined type:

ensure

Data type: Enum['present', 'absent']

State of nhc::conf

Default value: 'present'

checks

Data type: Variant[Hash, Array]

Checks to add to the configuration file

Default value: []

settings

Data type: Hash

Settings to add to the configuration file

Default value: {}

settings_host

Data type: Hash

Settings specific to a hosts to add to the configuration file

Default value: {}

config_overrides

Data type: Hash

Overrides for configuration in /etc/sysconfig/$name

Default value: {}

detached_mode

Data type: Boolean

Value for DETACHED_MODE

Default value: false

detached_mode_fail_nodata

Data type: Boolean

Value for DETACHED_MODE_FAIL_NODATA

Default value: false

program_name

Data type: String

Value for NAME

Default value: $name

conf_dir

Data type: Optional[Stdlib::Absolutepath]

Path to NHC configuration directry. Defaults to /etc/nhc

Default value: undef

conf_file

Data type: Optional[Stdlib::Absolutepath]

Path for this configuration file. Defaults to /etc/nhc/$name.conf

Default value: undef

include_dir

Data type: Optional[Stdlib::Absolutepath]

Path to directory containing NHC checks. Defaults to /etc/nhc/scripts

Default value: undef

sysconfig_path

Data type: Optional[Stdlib::Absolutepath]

Path to sysconfig file. Defaults to /etc/sysconfig/$name

Default value: undef

log_file

Data type: Optional[Stdlib::Absolutepath]

Path to log file. Defaults to /var/log/$name.log

Default value: undef

nhc::custom_check

Add NHC custom check file

Examples

Define custom NHC check file
nhc::custom_check { 'osc_gpfs':
  source => 'puppet:///modules/profile/nhc/osc_gpfs.nhc',
}

Parameters

The following parameters are available in the nhc::custom_check defined type:

source

Data type: Optional[String]

The source of the custom check

Default value: undef