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.
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 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'manifests/params.pp', line 357
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}",
# main settings
$ng_log_file = '/var/log/nagios/nagios.log',
$ng_max_check_attempts = '10',
$ng_object_cache_file = '/var/spool/nagios/objects.cache',
$ng_precached_obj_file = '/var/spool/nagios/objects.precache',
$ng_resource_file = '/etc/nagios/private/resource.cfg',
$ng_status_file = '/var/log/nagios/status.dat',
$ng_status_upd_interval = '10',
$ng_check_ext_commands = '1',
$ng_command_file = '/var/spool/nagios/cmd/nagios.cmd',
$ng_enable_query_handler = false,
$ng_query_socket = '/var/spool/nagios/cmd/nagios.qh',
$ng_lock_file = '/var/run/nagios/nagios.pid',
$ng_temp_file = '/var/spool/nagios/nagios.tmp',
$ng_temp_path = '/tmp',
$ng_event_broker_options = '-1',
$ng_event_broker_module = '',
$ng_log_rotation_method = 'h',
$ng_log_archive_path = '/var/log/nagios/archives',
$ng_use_syslog = '1',
$ng_log_notifications = '1',
$ng_log_service_retries = '1',
$ng_log_host_retries = '1',
$ng_log_event_handlers = '1',
$ng_log_initial_states = '0',
$ng_log_current_states = '1',
$ng_log_external_commands = '1',
$ng_log_passive_checks = '1',
$ng_glob_host_evt_handler = '',
$ng_glob_svc_evt_handler = '',
$ng_svc_int_check_delay = 's',
$ng_max_svc_check_spread = '30',
$ng_svc_interleave_factor = 's',
$ng_host_int_check_delay = 's',
$ng_max_host_check_spread = '30',
$ng_max_concurrent_checks = '0',
$ng_check_res_reaper_freq = '10',
$ng_max_check_res_reap_time = '30',
$ng_check_result_path = '/var/spool/nagios/checkresults',
$ng_max_check_res_file_age = '3600',
$ng_cached_h_check_horizon = '15',
$ng_cached_s_check_horizon = '15',
$ng_pred_host_dep_checks = '1',
$ng_pred_svc_dep_checks = '1',
$ng_soft_state_dependencies = '0',
$ng_time_change_threshold = '900',
$ng_auto_reschedule_checks = '0',
$ng_auto_reschedule_intval = '30',
$ng_auto_reschedule_window = '180',
) {
# 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'
$ng_nagios_cfg_file = "${ng_main_dir}/nagios.cfg"
$ng_nagios_cfg_erb = 'cd_nagios/nagios/nagios_cfg.erb'
# certbot
$ng_certbot_main_dir = '/etc/letsencrypt'
$ng_certbot_archive = "${ng_certbot_main_dir}/archive"
$ng_certbot_check = "${ng_certbot_archive}/${ng_webserver_name}/cert1.pem"
$ng_certbot_live = "${ng_certbot_main_dir}/live"
# nagios
$ng_target_templates = "${ng_conf_d_dir}/templates.cfg"
$ng_target_timeperiods = "${ng_conf_d_dir}/timeperiods.cfg"
$ng_target_localhost = "${ng_conf_d_dir}/nagios_localhost.cfg"
$ng_target_host = "${ng_conf_d_dir}/nagios_host.cfg"
$ng_target_hostgroup = "${ng_conf_d_dir}/nagios_hostgroup.cfg"
$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_servicegroup = "${ng_conf_d_dir}/nagios_servicegroup.cfg"
$ng_target_contact = "${ng_conf_d_dir}/nagios_contact.cfg"
$ng_target_contactgroup = "${ng_conf_d_dir}/nagios_contactgroup.cfg"
$ng_target_command = "${ng_conf_d_dir}/nagios_command.cfg"
# includes must be last
include cd_nagios::main::config
}
|