Skip to content

Instantly share code, notes, and snippets.

@skihero
Created October 27, 2014 16:17
Show Gist options
  • Save skihero/d4cc13258c7d4898036d to your computer and use it in GitHub Desktop.
Save skihero/d4cc13258c7d4898036d to your computer and use it in GitHub Desktop.
attributes/default.rb
cat attributes/default.rb
# nrpe packge options
default['nrpe']['package']['options'] = nil
# nrpe daemon user/group
default['nrpe']['user'] = 'nagios'
default['nrpe']['group'] = 'nagios'
# config file options
default['nrpe']['allow_bash_command_substitution'] = nil
default['nrpe']['server_port'] = 5666
default['nrpe']['server_address'] = nil
default['nrpe']['command_prefix'] = nil
default['nrpe']['log_facility'] = nil
default['nrpe']['debug'] = 0
default['nrpe']['dont_blame_nrpe'] = 1
default['nrpe']['command_timeout'] = 60
default['nrpe']['connection_timeout'] = nil
# authorization options
default['nrpe']['server_role'] = 'monitoring'
default['nrpe']['allowed_hosts'] = 10.7.7.7
default['nrpe']['using_solo_search'] = false
default['nrpe']['multi_environment_monitoring'] = false
# platform specific values
case node['platform_family']
when 'rhel', 'fedora'
default['nrpe']['install_method'] = 'package'
default['nrpe']['pid_file'] = '/var/run/nrpe.pid'
default['nrpe']['packages'] = %w(nrpe nagios-plugins-disk nagios-plugins-load nagios-plugins-procs nagios-plugins-users)
if node['kernel']['machine'] == 'i686'
default['nrpe']['home'] = '/usr/lib/nagios'
default['nrpe']['ssl_lib_dir'] = '/usr/lib'
default['nrpe']['plugin_dir'] = '/usr/lib/nagios/plugins'
else
default['nrpe']['home'] = '/usr/lib64/nagios'
default['nrpe']['ssl_lib_dir'] = '/usr/lib64'
default['nrpe']['plugin_dir'] = '/usr/lib64/nagios/plugins'
end
default['nrpe']['service_name'] = 'nrpe'
default['nrpe']['conf_dir'] = '/etc/nagios'
else
default['nrpe']['install_method'] = 'source'
default['nrpe']['pid_file'] = '/var/run/nrpe.pid'
default['nrpe']['home'] = '/usr/lib/nagios'
default['nrpe']['ssl_lib_dir'] = '/usr/lib'
default['nrpe']['service_name'] = 'nrpe'
default['nrpe']['plugin_dir'] = '/usr/lib/nagios/plugins'
default['nrpe']['conf_dir'] = '/etc/nagios'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment