From 6ad60490ab71575423d078642e0805dd9aed566c Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Mon, 2 Mar 2026 14:21:21 +0100 Subject: [PATCH] Recommit for updates in build 132 --- doc/_index.html | 10 + doc/puppet_class_list.html | 19 +- ...fdroid_nagios_3A_3Anagios_3A_3Aconfig.html | 2 +- ...gios_3A_3Aobjects_3A_3Atemplate_rules.html | 279 +++++++ .../confdroid_nagios_3A_3Aparams.html | 4 +- doc/puppet_defined_type_list.html | 11 +- ..._3Anagios_3A_3Aobjects_3A_3Atemplates.html | 765 ++++++++++++++++++ 7 files changed, 1080 insertions(+), 10 deletions(-) create mode 100644 doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html create mode 100644 doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html diff --git a/doc/_index.html b/doc/_index.html index 4079f0a..e8739cc 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -128,6 +128,11 @@ +
  • + confdroid_nagios::nagios::objects::template_rules + +
  • +
  • confdroid_nagios::nagios::resources::resource @@ -204,6 +209,11 @@
  • +
  • + confdroid_nagios::nagios::objects::templates + +
  • +
  • confdroid_nagios::nagios::resources::resource_df diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html index d04a335..c43f018 100644 --- a/doc/puppet_class_list.html +++ b/doc/puppet_class_list.html @@ -124,42 +124,49 @@
  • -
  • +
  • + +
  • + + +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aconfig.html b/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aconfig.html index 5fe856f..cdb6b65 100644 --- a/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aconfig.html +++ b/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aconfig.html @@ -124,7 +124,7 @@ class confdroid_nagios::nagios::config ( ) inherits confdroid_nagios::params { if $ng_nagios_server == $fqdn { require confdroid_nagios::nagios::objects::commands - #require confdroid_nagios::nagios::objects::template_rules + require confdroid_nagios::nagios::objects::template_rules require confdroid_nagios::nagios::objects::add_contact_rules require confdroid_nagios::nagios::objects::add_contactgroups_rules require confdroid_nagios::nagios::objects::add_hostgroup_rules diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html b/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html new file mode 100644 index 0000000..630f8bd --- /dev/null +++ b/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html @@ -0,0 +1,279 @@ + + + + + + + Puppet Class: confdroid_nagios::nagios::objects::template_rules + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nagios::nagios::objects::template_rules

    +
    + +
    +
    Inherits:
    +
    confdroid_nagios::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/nagios/objects/template_rules.pp +
    +
    +
    + +

    Summary

    + Class manages /etc/nagios/conf.d/nagios_templates.cfg through +concat. + +

    Overview

    +
    +
    + +

    confdroid_nagios::nagios::objects::template_rules.pp Module name: confdroid_nagios Author: 12ww1160 (12ww1160@confdroid.com)

    + +
    +
    + + + +
    + +
    +

    Examples:

    + + +

    +

    confdroid_nagios::nagios::objects::templates { ‘generic contact’:

    +

    + +
    ng_template_object      => 'contact',
    +ng_template_object_name => 'generic-contact',
    +}
    + +
    + + + +
    + + + + + +
    +
    +
    +
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +36
    +37
    +38
    +39
    +40
    +41
    +42
    +43
    +44
    +45
    +46
    +47
    +48
    +49
    +50
    +51
    +52
    +53
    +54
    +55
    +56
    +57
    +58
    +59
    +60
    +61
    +62
    +63
    +64
    +65
    +66
    +67
    +68
    +69
    +70
    +71
    +72
    +73
    +74
    +75
    +76
    +77
    +78
    +79
    +80
    +81
    +82
    +
    +
    # File 'manifests/nagios/objects/template_rules.pp', line 11
    +
    +class confdroid_nagios::nagios::objects::template_rules (
    +
    +) inherits confdroid_nagios::params {
    +  if $ng_nagios_server == $fqdn {
    +    # create the templates.cfg file
    +
    +    concat { $ng_target_templates:
    +      ensure   => present,
    +      path     => $ng_target_templates,
    +      owner    => $ng_user,
    +      group    => $ng_user,
    +      mode     => '0640',
    +      selrange => s0,
    +      selrole  => object_r,
    +      seltype  => nagios_etc_t,
    +      seluser  => system_u,
    +      notify   => Service[$ng_service],
    +    }
    +
    +    concat::fragment { 'template_header':
    +      target  => $ng_target_templates,
    +      content => template($ng_templates_head_erb),
    +      order   => '000',
    +    }
    +
    +    # basic templates
    +    confdroid_nagios::nagios::objects::templates { 'generic contact':
    +      ng_template_object      => 'contact',
    +      ng_template_object_name => 'generic-contact',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'generic-host':
    +      ng_template_object      => 'host',
    +      ng_template_object_name => 'generic-host',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'linux-server':
    +      ng_template_object      => 'host',
    +      ng_template_object_name => 'linux-server',
    +      ng_template_object_use  => 'generic-host',
    +      ng_notification_options => 'd,u,r',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'windows-server':
    +      ng_template_object      => 'host',
    +      ng_template_object_name => 'windows-server',
    +      ng_template_object_use  => 'generic-host',
    +      ng_notification_options => 'd,u,r',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'generic-switch':
    +      ng_template_object      => 'host',
    +      ng_template_object_name => 'generic-switch',
    +      ng_template_object_use  => 'generic-host',
    +      ng_notification_options => 'd,u,r',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'generic-printer':
    +      ng_template_object      => 'host',
    +      ng_template_object_name => 'generic-printer',
    +      ng_template_object_use  => 'generic-host',
    +      ng_notification_options => 'd,u,r',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'generic-service':
    +      ng_template_object      => 'service',
    +      ng_template_object_name => 'generic-service',
    +      ng_max_check_attempts   => '3',
    +      ng_notification_options => 'w,u,c,r',
    +    }
    +    confdroid_nagios::nagios::objects::templates { 'local-service':
    +      ng_template_object      => 'service',
    +      ng_template_object_name => 'local-service',
    +      ng_max_check_attempts   => '4',
    +      ng_template_object_use  => 'generic-service',
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html b/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html index fc43319..886c1c8 100644 --- a/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html +++ b/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html @@ -89,6 +89,8 @@ confdroid_nagios::nagios::resources::resource
    + confdroid_nagios::nagios::objects::template_rules
    + confdroid_nagios::nagios::objects::add_contact_rules
    confdroid_nagios::nagios::objects::add_hostgroup_rules
    @@ -1340,7 +1342,7 @@ class confdroid_nagios::params ( $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_service_cmd = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios' + $ng_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' diff --git a/doc/puppet_defined_type_list.html b/doc/puppet_defined_type_list.html index 97f2790..65238c7 100644 --- a/doc/puppet_defined_type_list.html +++ b/doc/puppet_defined_type_list.html @@ -75,14 +75,21 @@
  • -
  • +
  • + +
  • + + +
  • -
  • +
  • diff --git a/doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html b/doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html new file mode 100644 index 0000000..c5dfb9c --- /dev/null +++ b/doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html @@ -0,0 +1,765 @@ + + + + + + + Defined Type: confdroid_nagios::nagios::objects::templates + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Defined Type: confdroid_nagios::nagios::objects::templates

    +
    +
    +
    Defined in:
    +
    + manifests/nagios/objects/templates.pp +
    +
    +
    + +

    Summary

    + Define manages populates /etc/nagios/conf.d/templates.cfg. + +

    Overview

    +
    +
    + +

    confdroid_nagios::nagios::objects::templates.pp Module name: confdroid_nagios Author: 12ww1160 (12ww1160@confdroid.com) notifications. for the defined service or host.

    + +
    +
    + + + +
    +

    Parameters:

    +
      + +
    • + + ng_template_object + + + (Optional[String]) + + + (defaults to: undef) + + + — +
      +

      the object type for the templates. Valid options are contact, host and service.

      +
      + +
    • + +
    • + + ng_template_object_name + + + (Optional[String]) + + + (defaults to: undef) + + + — +
      +

      populates the name field, i.e. generic-contact, generic-host, generic-service.

      +
      + +
    • + +
    • + + ng_svc_notification_period + + + (String) + + + (defaults to: '24x7') + + + — +
      +

      Period in which to send out notifications for service events, i.e. 24x7.

      +
      + +
    • + +
    • + + ng_host_notification_period + + + (String) + + + (defaults to: '24x7') + + + — +
      +

      Period in which to send out notifications for host events , i.e. 24x7.

      +
      + +
    • + +
    • + + ng_service_notification_options + + + (String) + + + (defaults to: 'w,u,c,r,f,s') + + + — +
      +

      What service events to send out notifications for: w = notify on WARNING service states, u = notify on UNKNOWN service states, c = notify on CRITICAL service states, r = notify on service recoveries (OK states), f = notify when the service starts and stops flapping. n = none (the contact will not receive any type of service notifications).

      +
      + +
    • + +
    • + + ng_host_notification_options + + + (String) + + + (defaults to: 'd,u,r,f,s') + + + — +
      +

      What host events to send out notifications for: d = notify on DOWN host states, u = notify on UNREACHABLE host states, r = notify on host recoveries (UP states), f = notify when the host starts and stops flapping, s = notify when host or service scheduled downtime starts and ends. n = none (the contact will not receive any type of host notifications).

      +
      + +
    • + +
    • + + ng_service_notification_commands + + + (String) + + + (defaults to: 'notify-service-by-email') + + + — +
      +

      Command to use for service event notification. Command must be defined in commands.cfg

      +
      + +
    • + +
    • + + ng_host_notification_commands + + + (String) + + + (defaults to: 'notify-host-by-email') + + + — +
      +

      Command to use for host event notification. Command must be defined in commands.cfg.

      +
      + +
    • + +
    • + + ng_object_register + + + (String) + + + (defaults to: '0') + + + — +
      +

      Whether to register the object to Nagios. Since this is a template definition, we do not want to register those.

      +
      + +
    • + +
    • + + ng_template_object_use + + + (Optional[String]) + + + (defaults to: undef) + + + — +
      +

      Which template to use for a given host or service definition, i.e. generic-host, generic-service etc.

      +
      + +
    • + +
    • + + ng_notifications_enabled + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether notifications are enabled. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_event_handler_enabled + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether event handlers are enabled. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_flap_detection_enabled + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether flap detection is enabled. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_process_perf_data + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to process performance data. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_retain_status_information + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to retain status information. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_retain_nonstatus_information + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to retain non-status information. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_notification_period + + + (String) + + + (defaults to: '24x7') + + + — +
      +

      Which period in to send out

      +
      + +
    • + +
    • + + ng_notification_interval + + + (String) + + + (defaults to: '30') + + + — +
      +

      how often (in minutes) we should resend notifications for the current status.

      +
      + +
    • + +
    • + + ng_check_period + + + (String) + + + (defaults to: '24x7') + + + — +
      +

      Which period in to run checks for the defined object.

      +
      + +
    • + +
    • + + ng_max_check_attempts + + + (String) + + + (defaults to: '10') + + + — +
      +

      how often to check the defined object maximal.

      +
      + +
    • + +
    • + + ng_notification_options + + + (Optional[String]) + + + (defaults to: undef) + + + — +
      +

      see ng_service_notification_options and ng_host_notification_options.

      +
      + +
    • + +
    • + + ng_contact_groups + + + (String) + + + (defaults to: 'admins') + + + — +
      +

      contact groups for the defined object. Specified contact group must exit in contact_groups

      +
      + +
    • + +
    • + + ng_active_checks_enabled + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to enable active checks. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_passive_checks_enabled + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to enable passive checks. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_parallelize_check + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to parallelize checks Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_obsess_over_service + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to obsess over the service. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_check_freshness + + + (String) + + + (defaults to: '0') + + + — +
      +

      Whether to check freshness. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_is_volatile + + + (String) + + + (defaults to: '0') + + + — +
      +

      Whether the service is volatile. Valid options are 0 and 1.

      +
      + +
    • + +
    • + + ng_check_interval + + + (String) + + + (defaults to: '5') + + + — +
      +

      How often to check the service under normal conditions.

      +
      + +
    • + +
    • + + ng_retry_interval + + + (String) + + + (defaults to: '1') + + + — +
      +

      Re-check the service every x minutes until a hard state can be determined.

      +
      + +
    • + +
    • + + ng_host_check_command + + + (String) + + + (defaults to: 'check-host-alive') + + + — +
      +

      the check command for host checks

      +
      + +
    • + +
    + + + +
    + + + + + +
    +
    +
    +
    +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
    +
    +
    # File 'manifests/nagios/objects/templates.pp', line 79
    +
    +define confdroid_nagios::nagios::objects::templates (
    +  Optional[String] $ng_template_object        = undef,
    +  Optional[String] $ng_template_object_name   = undef,
    +  String $ng_svc_notification_period          = '24x7',
    +  String $ng_host_notification_period         = '24x7',
    +  String $ng_service_notification_options     = 'w,u,c,r,f,s',
    +  String $ng_host_notification_options        = 'd,u,r,f,s',
    +  String $ng_service_notification_commands    = 'notify-service-by-email',
    +  String $ng_host_notification_commands       = 'notify-host-by-email',
    +  String $ng_object_register                  = '0',
    +  Optional[String] $ng_template_object_use    = undef,
    +  String $ng_notifications_enabled            = '1',
    +  String $ng_event_handler_enabled            = '1',
    +  String $ng_flap_detection_enabled           = '1',
    +  String $ng_process_perf_data                = '1',
    +  String $ng_retain_status_information        = '1',
    +  String $ng_retain_nonstatus_information     = '1',
    +  String $ng_notification_period              = '24x7',
    +  String $ng_notification_interval            = '30',
    +  String $ng_check_period                     = '24x7',
    +  String $ng_check_interval                   = '5',
    +  String $ng_retry_interval                   = '1',
    +  String $ng_max_check_attempts               = '10',
    +  String $ng_host_check_command               = 'check-host-alive',
    +  Optional[String] $ng_notification_options   = undef,
    +  String $ng_contact_groups                   = 'admins',
    +  String $ng_active_checks_enabled            = '1',
    +  String $ng_passive_checks_enabled           = '1',
    +  String $ng_parallelize_check                = '1',
    +  String $ng_obsess_over_service              = '1',
    +  String $ng_check_freshness                  = '0',
    +  String $ng_is_volatile                    = '0',
    +
    +) {
    +  $ng_nagios_server       = $confdroid_nagios::params::ng_nagios_server
    +  $ng_target_templates    = $confdroid_nagios::params::ng_target_templates
    +  $ng_templates_rule_erb  = $confdroid_nagios::params::ng_templates_rule_erb
    +
    +  if $ng_nagios_server == $fqdn {
    +    concat::fragment { $name:
    +      target  => $ng_target_templates,
    +      content => template($ng_templates_rule_erb),
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file