Puppet Class: cd_nagios::params
- Inherited by:
-
cd_nagios::main::dirs
cd_nagios::main::user
cd_nagios::main::config
cd_nagios::main::install
cd_nagios::server::files
cd_nagios::certbot::certs
cd_nagios::client::target
cd_nagios::selinux::config
cd_nagios::server::service
cd_nagios::firewall::iptables
cd_nagios::server::access_rules
- Defined in:
- manifests/params.pp
Summary
Class holds all parameters for the cd_nagios module and is inherited by all classes except defines.Overview
cd_nagios::params.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)
License:
This file is part of cd_nagios.
cd_nagios is used for providing automatic configuration of Nagios. Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/. to connect to NRPE, which as of now does not trust DNS names. Must be the public interface in case of NAT environments. can issue host related commands. can issue service related commands.
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'manifests/params.pp', line 216
class cd_nagios::params (
$pkg_ensure = 'latest',
$ng_nagios_server = "nagios.${::domain}",
$ng_nagios_ext_ip = undef,
$ng_mail_user = "admin@${::domain}",
$ng_include_nrpe = true,
# firewall
$ng_include_fw = true,
$ng_use_https = true,
$ng_http_https_fw = true,
$ng_fw_order = '50',
$ng_http_port = '80',
$ng_https_port = '443',
# check command parameters
## ping
$ng_ping_warn = '100.0,20%',
$ng_ping_crit = '500.0,60%',
$ng_ping_ensure = 'present',
## disk
$ng_disk_warn = '20%',
$ng_disk_crit = '10%' ,
$ng_disk_ensure = 'present',
# swap
$ng_swap_warn = '20',
$ng_swap_crit = '10',
$ng_swap_ensure = 'present',
# users
$ng_users_warn = '20',
$ng_users_crit = '50',
$ng_users_ensure = 'present',
#total procs
$ng_procs_tot_warn = '330',
$ng_procs_tot_crit = '400',
$ng_procs_tot_param = 'RDST',
$ng_procs_tot_ens = 'present',
# zombie procs
$ng_procs_z_warn = '10',
$ng_procs_z_crit = '30',
$ng_procs_z_param = 'Z',
$ng_procs_z_ensure = 'present',
# load
$ng_load_warn = '5.00,4.00,3.00',
$ng_load_crit = '10.00,6.00,4.00',
$ng_load_ensure = 'present',
# user settings
$ng_user = 'nagios',
$ng_u_comment = 'Nagios service user',
$ng_u_uid = '1004',
$ng_user_home = '/var/spool/nagios',
$ng_u_groups = undef,
$ng_user_shell = '/bin/bash',
# cgi settings
$ng_context_help = '1',
$ng_pending_state = '1',
$ng_use_auth = '1',
$ng_use_ssl_auth = '0',
$ng_enable_def_user = false,
$ng_def_user_name = 'nagios_insecure',
$ng_nagios_admin = 'nagios_sec_adm',
$ng_sysinfo_auth = '',
$ng_confinfo_auth = '',
$ng_command_auth = '',
$ng_hostview_auth = '',
$ng_serviceview_auth = '',
$ng_host_cmd_auth = '',
$ng_svc_cmd_auth = '',
$ng_readonly_auth = '' ,
$ng_statusmap_img = 'smbackground.gd2',
$ng_use_colormap = false,
$ng_colormap_red = '255',
$ng_colormap_green = '255',
$ng_colormap_blue = '255',
$ng_statusmap_layout = '6',
$ng_wrl_layout = '4',
$ng_incl_own_wrl = false,
$ng_statuswrl_include = '',
$ng_ping_syntax = '/bin/ping -n -U -c 5 $HOSTADDRESS$',
$ng_refresh_rate = '90',
$ng_result_limit = '100',
$ng_escape_html = '1',
$ng_use_sound = false,
$ng_host_unreachable = 'hostdown.wav',
$ng_host_down = 'hostdown.wav',
$ng_svc_critical = 'critical.wav',
$ng_svc_warn = 'warning.wav',
$ng_svc_unknown = 'warning.wav',
$ng_normal_sound = 'noproblem.wav',
$ng_action_url_target = '_blank',
$ng_notes_url_target = '_blank',
$ng_lock_author_names = '1',
$ng_enable_splunk = false,
$ng_splunk_url = 'http://127.0.0.1:8000/',
$ng_navbar_addresses = '1',
$ng_navbar_aliases = '1',
$ng_ack_no_sticky = '0',
$ng_ack_no_send = '0',
# selinux
$ng_use_selinux_tools = true,
# httpd
$ng_required_hosts = '',
$ng_required_ips = '127.0.0.0/8',
$ng_enable_index = true,
# certbot
$ng_enable_certbot = true,
$ng_certbot_webroot = '/var/www/html',
$ng_webserver_name = "nagios.${::domain}",
) {
# installation section
$reqpackages_server = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['nagios','nagios-devel']
}
$reqpackages_client = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['net-snmp-utils','nagios-plugins','nagios-plugins-all', 'nagios-plugins-nrpe', 'nagios-common']
}
$reqpackages_nrpe = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['nrpe']
}
# service
$ng_service = 'nagios'
$ae_service = 'httpd'
# 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"
# files
$ng_main_config = "${ng_main_dir}/nagios.cfg"
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
$ng_htpasswd_file = "${ng_main_dir}/passwd"
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
$ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'
$ng_welcome_conf_erb = 'cd_nagios/httpd/welcome_conf.erb'
$ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
$ng_index_html_file = '/var/www/html/index.html'
$ng_index_html_erb = 'cd_nagios/httpd/index_html.erb'
$ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
$ng_ssl_vhost_erb = 'cd_nagios/httpd/nagios_ssl_vhost.erb'
# certbot
$ng_certbot_main_dir = '/etc/letsencrypt'
$ng_certbot_archive = "${ng_certbot_main_dir}/archive"
$ng_certbot_cert = "${ng_certbot_archive}/${ng_webserver_name}/cert1.pem"
# includes must be last
include cd_nagios::main::config
}
|