Puppet Class: confdroid_nagios::params

Summary

Class holds all parameters for the confdroid_nagios module and is inherited by all classes except defines.

Overview

confdroid_nagios::params Module name: confdroid_nagios Author: 12ww1160 (12ww1160@confdroid.com)

Parameters:

  • ng_nagios_server (String) (defaults to: 'nagios.example.net')

    The hostname or IP address of the Nagios server. This will determine the installation selection and the of the clients to connect to the Nagios server.

  • ng_reqpackages_server (Array) (defaults to: ['nagios','nagios-devel'])

    An array of packages to be installed on the Nagios server.

  • ng_reqpackages_client (Array) (defaults to: ['net-snmp-utils','nagios-plugins','nagios-plugins-all','nagios-plugins-nrpe','nagios-common'])

    An array of packages to be installed on the Nagios clients.

  • ng_pkg_ensure (String) (defaults to: 'present')

    The ensure value for all packages. Default is ‘present’.

  • ng_include_nrpe (Boolean) (defaults to: true)

    Whether to include the NRPE client on the Nagios clients. Default is true.

  • ng_use_https (Boolean) (defaults to: false)

    Whether to configure the Nagios web interface to use HTTPS. Default is false. We recommend using a reverse proxy with SSL termination in front of the Nagios web interface, so this is disabled by default.

  • ng_main_user (String) (defaults to: 'nagios')

    The username for the Nagios web interface. Default is ‘nagios’.

  • ng_main_password (String) (defaults to: 'nagios')

    The encrypted password for the Nagios web interface. Default is ‘nagios’. Must be properly encrypted using the htpasswd utility.

  • ng_context_help (String) (defaults to: '1')

    Whether to enable the context help in the Nagios web interface. Default is ‘1’.

  • ng_log_file (String) (defaults to: '/var/log/nagios/nagios.log')

    The path to the Nagios log file. Default is ‘/var/log/nagios/nagios.log’.

  • ng_ping_warn (String) (defaults to: '100.0,20%')

    The warning threshold for the check_ping command. Default is ‘100.0,20%’.

  • ng_ping_crit (String) (defaults to: '500.0,60%')

    The critical threshold for the check_ping command. Default is ‘500.0,60%’.

  • ng_ping_ensure (String) (defaults to: 'present')

    The ensure value for the check_ping command. Default is ‘present’.

  • ng_disk_warn (String) (defaults to: '20%')

    The warning threshold for the check_disk command. Default is ‘20%’.

  • ng_disk_crit (String) (defaults to: '10%')

    The critical threshold for the check_disk command. Default is ‘10%’.

  • ng_disk_ensure (String) (defaults to: 'present')

    The ensure value for the check_disk command. Default is ‘present’.

  • ng_swap_warn (String) (defaults to: '20')

    The warning threshold for the check_swap command. Default is ‘20’.

  • ng_swap_crit (String) (defaults to: '10')

    The critical threshold for the check_swap command. Default is ‘10’.

  • ng_swap_ensure (String) (defaults to: 'present')

    The ensure value for the check_swap command. Default is ‘present’.

  • ng_users_warn (String) (defaults to: '20')

    The warning threshold for the check_users command. Default is ‘20’.

  • ng_users_crit (String) (defaults to: '50')

    The critical threshold for the check_users command. Default is ‘50’.

  • ng_users_ensure (String) (defaults to: 'present')

    The ensure value for the check_users command. Default is ‘present’.

  • ng_procs_tot_warn (String) (defaults to: '330')

    The warning threshold for the check_procs command with total processes. Default is ‘330’.

  • ng_procs_tot_crit (String) (defaults to: '400')

    The critical threshold for the check_procs command with total processes. Default is ‘400’.

  • ng_procs_tot_param (String) (defaults to: 'RDST')

    The parameters for the check_procs command with total processes. Default is ‘RDST’.

  • ng_procs_tot_ensure (String)

    The ensure value for the check_procs command with total processes. Default is ‘present’.

  • ng_procs_z_warn (String) (defaults to: '10')

    The warning threshold for the check_procs command with zombie processes. Default is ‘10’.

  • ng_procs_z_crit (String) (defaults to: '30')

    The critical threshold for the check_procs command with zombie processes. Default is ‘30’.

  • ng_procs_z_param (String) (defaults to: 'Z')

    The parameters for the check_procs command with zombie processes. Default is ‘Z’.

  • ng_procs_z_ensure (String) (defaults to: 'present')

    The ensure value for the check_procs command with zombie processes. Default is ‘present’.

  • ng_load_warn (String) (defaults to: '5.00,4.00,3.00')

    The warning threshold for the check_load command. Default is ‘5.00,4.00,3.00’.

  • ng_load_crit (String) (defaults to: '10.00,6.00,4.00')

    The critical threshold for the check_load command. Default is ‘10.00,6.00,4.00’.

  • ng_load_ensure (String) (defaults to: 'present')

    The ensure value for the check_load command. Default is ‘present’.

  • ng_procs_tot_ens (String) (defaults to: 'present')


77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'manifests/params.pp', line 77

class confdroid_nagios::params (

# main
  String $ng_nagios_server          = 'nagios.example.net',
  Array $ng_reqpackages_server      = ['nagios','nagios-devel'],
  Array $ng_reqpackages_client      = ['net-snmp-utils','nagios-plugins','nagios-plugins-all','nagios-plugins-nrpe','nagios-common'],
  String $ng_pkg_ensure             = 'present',
  Boolean $ng_include_nrpe          = true,
  String $ng_main_user              = 'nagios',
  String $ng_main_password          = 'nagios',

# nagios.cfg
  String $ng_log_file               = '/var/log/nagios/nagios.log',

# cgi.cfg
  String $ng_context_help           = '1',

# httpd
  Boolean $ng_use_https             = false,

# check command parameters
## ping
  String $ng_ping_warn               = '100.0,20%',
  String $ng_ping_crit               = '500.0,60%',
  String $ng_ping_ensure             = 'present',
## disk
  String $ng_disk_warn               = '20%',
  String $ng_disk_crit               = '10%' ,
  String $ng_disk_ensure             = 'present',
# swap
  String $ng_swap_warn               = '20',
  String $ng_swap_crit               = '10',
  String $ng_swap_ensure             = 'present',
# users
  String $ng_users_warn              = '20',
  String $ng_users_crit              = '50',
  String $ng_users_ensure            = 'present',
#total procs
  String $ng_procs_tot_warn          = '330',
  String $ng_procs_tot_crit          = '400',
  String $ng_procs_tot_param         = 'RDST',
  String $ng_procs_tot_ens           = 'present',
# zombie procs
  String $ng_procs_z_warn            = '10',
  String $ng_procs_z_crit            = '30',
  String $ng_procs_z_param           = 'Z',
  String $ng_procs_z_ensure          = 'present',
# load
  String $ng_load_warn               = '5.00,4.00,3.00',
  String $ng_load_crit               = '10.00,6.00,4.00',
  String $ng_load_ensure             = 'present',

) {
# Default facts
  $fqdn                     = $facts['networking']['fqdn']
  $domain                   = $facts['networking']['domain']
  $os_name                  = $facts['os']['name']
  $os_release               = $facts['os']['release']['major']

# service
  $ng_nagios_service          = 'nagios'

# directories
  $ng_main_dir                = '/etc/nagios'
  $ng_conf_d_dir              = "${ng_main_dir}/conf.d"
  $ng_objects_dir             = "${ng_main_dir}/objects"
  $ng_private_dir             = "${ng_main_dir}/private"
  $ng_usr_incl                = '/usr/include/nagios'
  $ng_lib_dir                 = '/usr/lib64/nagios'
  $ng_log_dir                 = '/var/log/nagios'
  $ng_log_archives            = "${ng_log_dir}/archives"
  $ng_spool_dir               = '/var/spool/nagios'
  $ng_usr_share               = '/usr/share/nagios'
  $ng_share_html              = "${ng_usr_share}/html"
  $ng_run_dir                 = '/var/run/nagios'
  $ng_cmd_dir                 = "${ng_spool_dir}/cmd"
  $ng_checkresults_dir        = "${ng_spool_dir}/checkresults"

# files
  $ng_nagios_cfg_file         = "${ng_main_dir}/nagios.cfg"
  $ng_nagios_cfg_erb          = 'confdroid_nagios/nagios/nagios_cfg.erb'
  $ng_cgi_cfg_file            = "${ng_main_dir}/cgi.cfg"
  $ng_cgi_cfg_erb             = 'confdroid_nagios/nagios/cgi_cfg.erb'

# nagios
  $ng_target_templates        = "${ng_conf_d_dir}/nagios_templates.cfg"
  $ng_templates_head_erb      = 'confdroid_nagios/nagios/templates_cfg_head.erb'
  $ng_templates_rule_erb      = 'confdroid_nagios/nagios/templates_cfg_rule.erb'
  $ng_tgt_timeperiods_base    = "${ng_conf_d_dir}/nagios_timeperiods.cfg"
  $ng_tgt_timep_add           = "${ng_conf_d_dir}/nagios_timeperiods_add.cfg"
  $ng_tgt_timep_head_erb      = 'confdroid_nagios/nagios/timeperiods_cfg_head.erb'
  $ng_tgt_timep_rule_erb      = 'confdroid_nagios/nagios/timeperiods_cfg_rule.erb'
  $ng_target_localhost        = "${ng_conf_d_dir}/nagios_localhost.cfg"
  $ng_target_host             = "${ng_conf_d_dir}/nagios_host.cfg"
  $ng_target_hostgroup_base   = "${ng_conf_d_dir}/nagios_hostgroups_base.cfg"
  $ng_tgt_hostgroup_add       = "${ng_conf_d_dir}/nagios_hostgroups_add.cfg"
  $ng_tgt_hostgrp_head_erb    = 'confdroid_nagios/nagios/hostgroups_cfg_head.erb'
  $ng_tgt_hostgrp_rule_erb    = 'confdroid_nagios/nagios/hostgroups_cfg_rule.erb'
  $ng_target_hostdep          = "${ng_conf_d_dir}/nagios_hostdependency.cfg"
  $ng_target_hostesc          = "${ng_conf_d_dir}/nagios_hostescalation.cfg"
  $ng_target_hostext          = "${ng_conf_d_dir}/nagios_hostextinfo.cfg"
  $ng_target_service          = "${ng_conf_d_dir}/nagios_service.cfg"
  $ng_target_svcgrp_base      = "${ng_conf_d_dir}/nagios_servicegroups_base.cfg"
  $ng_tgt_servicegroup_add    = "${ng_conf_d_dir}/nagios_servicegroups_add.cfg"
  $ng_tgt_svcgrp_head_erb     = 'confdroid_nagios/nagios/svcgroups_cfg_head.erb'
  $ng_tgt_svcgrp_rule_erb     = 'confdroid_nagios/nagios/svcgroups_cfg_rule.erb'
  $ng_target_base_contact     = "${ng_conf_d_dir}/nagios_contact_base.cfg"
  $ng_target_add_contact      = "${ng_conf_d_dir}/nagios_contact_add.cfg"
  $ng_contacts_head_erb       = 'confdroid_nagios/nagios/contacts_cfg_head.erb'
  $ng_contacts_rule_erb       = 'confdroid_nagios/nagios/contacts_cfg_rule.erb'
  $ng_tgt_contactgroup_base   = "${ng_conf_d_dir}/nagios_contactgroup_base.cfg"
  $ng_tgt_contactgroup_add    = "${ng_conf_d_dir}/nagios_contactgroup_add.cfg"
  $ng_cntctgrps_head_erb      = 'confdroid_nagios/nagios/contactgroups_cfg_head.erb'
  $ng_cntctgrps_rule_erb      = 'confdroid_nagios/nagios/contactgroups_cfg_rule.erb'
  $ng_target_command          = "${ng_conf_d_dir}/nagios_commands_base.cfg"
  $ng_nagios_service_cmd      = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios'
  $ng_htpasswd_file           = "${ng_main_dir}/passwd"
  $ng_htpasswd_head           = 'confdroid_nagios/nagios/htpasswd_head.erb'
  $ng_htpasswd_rule           = 'confdroid_nagios/nagios/htpasswd_rule.erb'
  $ng_resource_file           = '/etc/nagios/private/resource.cfg'
  $ng_resource_erb            = 'confdroid_nagios/nagios/resource_cfg.erb'

## old
  $ng_taccgi_erb              = 'confdroid_nagios/selinux/taccgi.erb'
  $ng_statcgi_erb             = 'confdroid_nagios/selinux/statuscgi.erb'
  $ng_statdat_erb             = 'confdroid_nagios/selinux/statusdat.erb'
  $ng_checknrpe_erb           = 'confdroid_nagios/selinux/checknrpe.erb'
  $ng_checknagios_erb         = 'confdroid_nagios/selinux/checknagios.erb'
  $ng_nagios_conf             = '/etc/httpd/conf.d/nagios.conf'
  $ng_nagios_conf_erb         = 'confdroid_nagios/httpd/nagios_conf.erb'
  $ng_welcome_conf            = '/etc/httpd/conf.d/welcome.conf'
  $ng_welcome_conf_erb        = 'confdroid_nagios/httpd/welcome_conf.erb'
  $ng_forward_conf            = '/etc/httpd/conf.d/nagios_forward.conf'
  $ng_forward_conf_erb        = 'confdroid_nagios/httpd/forward_conf.erb'
  $ng_get_cert_erb            = 'confdroid_nagios/certbot/get_cert.erb'
  $ng_unless_get_cert         = 'confdroid_nagios/certbot/unless_get_cert.erb'
  $ng_unless_renew_erb        = 'confdroid_nagios/certbot/unless_renew_cert.erb'
  $ng_index_html_file         = '/var/www/html/index.html'
  $ng_index_html_erb          = 'confdroid_nagios/httpd/index_html.erb'
  $ng_ssl_vhost_file          = '/etc/httpd/conf.d/nagios_ssl.conf'
  $ng_ssl_vhost_erb           = 'confdroid_nagios/httpd/nagios_ssl_vhost.erb'
  $ng_grep_erb                = 'confdroid_nagios/selinux/grep.erb'

# includes must be last
  include confdroid_nagios::main::config
}