<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,8 +35,13 @@ node 'distributed_monitoring_server' {
 
   # active check on distributed monitoring server 
   # and passive check on central server
-  nagios::service::distributed {&quot;check_local_du&quot;:}
-  nagios::service::distributed {&quot;check_http&quot;:}
+  nagios::service::distributed {&quot;check_local_du on $fqdn&quot;:
+    check_command =&gt; check_local_du;
+  }
+
+  nagios::service::distributed {&quot;check_http on $fqdn&quot;:
+    check_command =&gt; check_http;
+  }
 
   # active check only on central server
   nagios::service::remote {&quot;check_url!distributed_monitoring_server!/test/page.php&quot;:</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ define command{
 define command{
   name          check_local_du
   command_name  check_local_du
-  command_line  $USER1$/check_disk -l -w 20% -c 10%
+  command_line  $USER1$/check_disk -l -w 10% -c 5%
 }
 
 define command{</diff>
      <filename>files/generic-command.cfg</filename>
    </modified>
    <modified>
      <diff>@@ -85,7 +85,7 @@ class nagios::nsca::client {
             require   =&gt; File[&quot;$nagios_cfg_dir/hosts.cfg&quot;],
           }
     
-          @@nagios_service {&quot;@@check_ssh&quot;:
+          @@nagios_service {&quot;@@check_ssh on $fqdn&quot;:
             use                   =&gt; &quot;generic-service-passive&quot;,
             host_name             =&gt; $fqdn,
             tag                   =&gt; &quot;nagios&quot;,</diff>
      <filename>manifests/classes/nsca-client.pp</filename>
    </modified>
    <modified>
      <diff>@@ -27,12 +27,14 @@ class nagios::webinterface {
             require =&gt; Apache::Vhost[$fqdn],
           }
 
-          # superadmin access
-          line {&quot;nagiosadmin password&quot;:
-            line    =&gt; &quot;nagiosadmin:${nagiosadmin_password}&quot;,
-            ensure  =&gt; present,
-            file    =&gt; &quot;/var/www/$fqdn/private/nagios-htpasswd&quot;,
-            require =&gt; File[&quot;/var/www/$fqdn/private/nagios-htpasswd&quot;],
+          if $nagiosadmin_password {
+            # superadmin access
+            line {&quot;nagiosadmin password&quot;:
+              line    =&gt; &quot;nagiosadmin:${nagiosadmin_password}&quot;,
+              ensure  =&gt; present,
+              file    =&gt; &quot;/var/www/$fqdn/private/nagios-htpasswd&quot;,
+              require =&gt; File[&quot;/var/www/$fqdn/private/nagios-htpasswd&quot;],
+            }
           }
 
           file {&quot;/var/www/$fqdn/conf/nagios.conf&quot;:</diff>
      <filename>manifests/classes/webinterface.pp</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
 # See LICENSE for the full license granted to you.
 #
 
-define nagios::service::distributed ($ensure=present, $service_description=&quot;&quot;) {
+define nagios::service::distributed ($ensure=present, $check_command, $service_description=&quot;&quot;) {
 
   $desc = $service_description ? {
     &quot;&quot;      =&gt; $name,
@@ -16,7 +16,7 @@ define nagios::service::distributed ($ensure=present, $service_description=&quot;&quot;) {
     ensure                =&gt; $ensure,
     use                   =&gt; &quot;generic-service-active&quot;,
     host_name             =&gt; $fqdn,
-    check_command         =&gt; &quot;$name&quot;,
+    check_command         =&gt; $check_command,
     tag                   =&gt; &quot;nagios&quot;,
     service_description   =&gt; $desc,
     target                =&gt; &quot;$nagios_cfg_dir/services.cfg&quot;,</diff>
      <filename>manifests/definitions/service-distributed.pp</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ define nagios::service::local ($ensure=present, $service_description=&quot;&quot;) {
     ensure                =&gt; $ensure,
     use                   =&gt; &quot;generic-service-active&quot;,
     host_name             =&gt; $fqdn,
-    check_command         =&gt; &quot;$name&quot;,
+    check_command         =&gt; $name,
     tag                   =&gt; &quot;nagios&quot;,
     service_description   =&gt; $desc,
     target                =&gt; &quot;$nagios_cfg_dir/services.cfg&quot;,</diff>
      <filename>manifests/definitions/service-local.pp</filename>
    </modified>
    <modified>
      <diff>@@ -11,19 +11,21 @@
 # This tells the CGIs where to find your main configuration file.
 # The CGIs will read the main and host config files for any other
 # data they might need.
-
+&lt;% if has_variable?(&quot;nagios_main_config_file&quot;) %&gt;
 main_config_file=&lt;%= nagios_main_config_file %&gt;
-
-
+&lt;% else %&gt;
+main_config_file=/etc/nagios3/nagios.cfg
+&lt;% end %&gt;
 
 # PHYSICAL HTML PATH
 # This is the path where the HTML files for Nagios reside.  This
 # value is used to locate the logo images needed by the statusmap
 # and statuswrl CGIs.
-
+&lt;% if has_variable?(&quot;nagios_physical_html_path&quot;) %&gt;
 physical_html_path=&lt;%= nagios_physical_html_path %&gt;
-
-
+&lt;% else %&gt;
+physical_html_path=/usr/share/nagios3/htdocs
+&lt;% end %&gt;
 
 # URL HTML PATH
 # This is the path portion of the URL that corresponds to the
@@ -32,30 +34,39 @@ physical_html_path=&lt;%= nagios_physical_html_path %&gt;
 # and graphics.  If you access the Nagios pages with an URL like
 # http://www.myhost.com/nagios, this value should be '/nagios'
 # (without the quotes).
-
+&lt;% if has_variable?(&quot;nagios_url_html_path&quot;) %&gt;
+url_html_path=&lt;%= nagios_url_html_path %&gt;
+&lt;% else %&gt;
 url_html_path=/nagios3
-
-
+&lt;% end %&gt;
 
 # CONTEXT-SENSITIVE HELP
 # This option determines whether or not a context-sensitive
 # help icon will be displayed for most of the CGIs.
 # Values: 0 = disables context-sensitive help
 #         1 = enables context-sensitive help
-
+&lt;% if has_variable?(&quot;nagios_show_context_help&quot;) %&gt;
 show_context_help=&lt;%= nagios_show_context_help %&gt;
-
+&lt;% else %&gt;
+show_context_help=0
+&lt;% end %&gt;
 
 # PENDING STATES OPTION
 # This option determines what states should be displayed in the web
 # interface for hosts/services that have not yet been checked.
 # Values: 0 = leave hosts/services that have not been check yet in their original state
 #         1 = mark hosts/services that have not been checked yet as PENDING
-
+&lt;% if has_variable?(&quot;nagios_show_context_help&quot;) %&gt;
+use_pending_states=&lt;%= nagios_show_context_help %&gt;
+&lt;% else %&gt;
 use_pending_states=1
+&lt;% end %&gt;
 
+&lt;% if has_variable?(&quot;nagios_nagios_check_command&quot;) %&gt;
+nagios_check_command=&lt;%= nagios_nagios_check_command %&gt;
+&lt;% else %&gt;
 nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/cache/nagios3/status.dat 5 '/usr/sbin/nagios3'
-
+&lt;% end %&gt;
 
 # AUTHENTICATION USAGE
 # This option controls whether or not the CGIs will use any 
@@ -73,10 +84,11 @@ nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/cache/nagios3/sta
 # Setting this value to 0 will cause the CGIs to *not* use
 # authentication (bad idea), while any other value will make them
 # use the authentication functions (the default).
-
+&lt;% if has_variable?(&quot;nagios_use_authentication&quot;) %&gt;
+use_authentication=&lt;%= nagios_use_authentication %&gt;
+&lt;% else %&gt;
 use_authentication=1
-
-
+&lt;% end %&gt;
 
 # DEFAULT USER
 # Setting this variable will define a default user name that can
@@ -91,10 +103,8 @@ use_authentication=1
 # access to the CGIs has been authenticated in some manner!  If you
 # define this variable, anyone who has not authenticated to the web
 # server will inherit all rights you assign to this user!
- 
-#default_user_name=guest
-
 
+#default_user_name=guest
 
 # SYSTEM/PROCESS INFORMATION ACCESS
 # This option is a comma-delimited list of all usernames that
@@ -103,10 +113,11 @@ use_authentication=1
 # default, *no one* has access to this unless you choose to
 # not use authorization.  You may use an asterisk (*) to
 # authorize any user who has authenticated to the web server.
-
+&lt;% if has_variable?(&quot;nagios_authorized_for_system_information&quot;) %&gt;
+authorized_for_system_information=&lt;%= nagios_authorized_for_system_information %&gt;
+&lt;% else %&gt;
 authorized_for_system_information=nagiosadmin
-
-
+&lt;% end %&gt;
 
 # CONFIGURATION INFORMATION ACCESS
 # This option is a comma-delimited list of all usernames that
@@ -115,10 +126,11 @@ authorized_for_system_information=nagiosadmin
 # for the hosts and services they are contacts for. You may use
 # an asterisk (*) to authorize any user who has authenticated
 # to the web server.
-
+&lt;% if has_variable?(&quot;nagios_authorized_for_configuration_information&quot;) %&gt;
+authorized_for_configuration_information=&lt;%= nagios_authorized_for_configuration_information %&gt;
+&lt;% else %&gt;
 authorized_for_configuration_information=nagiosadmin
-
-
+&lt;% end %&gt;
 
 # SYSTEM/PROCESS COMMAND ACCESS
 # This option is a comma-delimited list of all usernames that
@@ -128,10 +140,11 @@ authorized_for_configuration_information=nagiosadmin
 # has access to this unless you choose to not use authorization.
 # You may use an asterisk (*) to authorize any user who has
 # authenticated to the web server.
-
+&lt;% if has_variable?(&quot;nagios_authorized_for_system_commands&quot;) %&gt;
+authorized_for_system_commands=&lt;%= nagios_authorized_for_system_commands %&gt;
+&lt;% else %&gt;
 authorized_for_system_commands=nagiosadmin
-
-
+&lt;% end %&gt;
 
 # GLOBAL HOST/SERVICE VIEW ACCESS
 # These two options are comma-delimited lists of all usernames that
@@ -140,12 +153,17 @@ authorized_for_system_commands=nagiosadmin
 # for hosts or services that they are contacts for (unless you
 # you choose to not use authorization). You may use an asterisk (*)
 # to authorize any user who has authenticated to the web server.
-
-
+&lt;% if has_variable?(&quot;nagios_authorized_for_all_services&quot;) %&gt;
+authorized_for_all_services=&lt;%= nagios_authorized_for_all_services %&gt;
+&lt;% else %&gt;
 authorized_for_all_services=nagiosadmin
-authorized_for_all_hosts=nagiosadmin
-
+&lt;% end %&gt;
 
+&lt;% if has_variable?(&quot;nagios_authorized_for_all_hosts&quot;) %&gt;
+authorized_for_all_hosts=&lt;%= nagios_authorized_for_all_hosts %&gt;
+&lt;% else %&gt;
+authorized_for_all_hosts=nagiosadmin
+&lt;% end %&gt;
 
 # GLOBAL HOST/SERVICE COMMAND ACCESS
 # These two options are comma-delimited lists of all usernames that
@@ -155,12 +173,17 @@ authorized_for_all_hosts=nagiosadmin
 # that they are contacts for (unless you you choose to not use 
 # authorization).  You may use an asterisk (*) to authorize any
 # user who has authenticated to the web server.
-
+&lt;% if has_variable?(&quot;nagios_authorized_for_all_service_commands&quot;) %&gt;
+authorized_for_all_service_commands=&lt;%= nagios_authorized_for_all_service_commands %&gt;
+&lt;% else %&gt;
 authorized_for_all_service_commands=nagiosadmin
-authorized_for_all_host_commands=nagiosadmin
-
-
+&lt;% end %&gt;
 
+&lt;% if has_variable?(&quot;nagios_authorized_for_all_host_commands&quot;) %&gt;
+authorized_for_all_host_commands=&lt;%= nagios_authorized_for_all_host_commands %&gt;
+&lt;% else %&gt;
+authorized_for_all_host_commands=nagiosadmin
+&lt;% end %&gt;
 
 # STATUSMAP BACKGROUND IMAGE
 # This option allows you to specify an image to be used as a 
@@ -175,8 +198,6 @@ authorized_for_all_host_commands=nagiosadmin
 
 #statusmap_background_image=smbackground.gd2
 
-
-
 # DEFAULT STATUSMAP LAYOUT METHOD
 # This option allows you to specify the default layout method
 # the statusmap CGI should use for drawing hosts.  If you do
@@ -187,11 +208,11 @@ authorized_for_all_host_commands=nagiosadmin
 #       2 = Collapsed tree
 #       3 = Balanced tree
 #       4 = Circular
-#       5 = Circular (Marked Up)
-
+&lt;% if has_variable?(&quot;nagios_default_statusmap_layout&quot;) %&gt;
+default_statusmap_layout=&lt;%= nagios_default_statusmap_layout %&gt;
+&lt;% else %&gt;
 default_statusmap_layout=5
-
-
+&lt;% end %&gt;
 
 # DEFAULT STATUSWRL LAYOUT METHOD
 # This option allows you to specify the default layout method
@@ -202,10 +223,11 @@ default_statusmap_layout=5
 #       2 = Collapsed tree
 #       3 = Balanced tree
 #       4 = Circular
-
+&lt;% if has_variable?(&quot;nagios_default_statuswrl_layout&quot;) %&gt;
+default_statuswrl_layout=&lt;%= nagios_default_statuswrl_layout %&gt;
+&lt;% else %&gt;
 default_statuswrl_layout=4
-
-
+&lt;% end %&gt;
 
 # STATUSWRL INCLUDE
 # This option allows you to include your own objects in the 
@@ -227,28 +249,30 @@ default_statuswrl_layout=4
 # notorious for being different on virtually ever *NIX
 # OS and distribution, so you may have to tweak this to
 # work on your system.
-
+&lt;% if has_variable?(&quot;nagios_ping_syntax&quot;) %&gt;
+ping_syntax=&lt;%= nagios_ping_syntax %&gt;
+&lt;% else %&gt;
 ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
-
-
+&lt;% end %&gt;
 
 # REFRESH RATE
 # This option allows you to specify the refresh rate in seconds
 # of various CGIs (status, statusmap, extinfo, and outages).  
-
+&lt;% if has_variable?(&quot;nagios_refresh_rate&quot;) %&gt;
+refresh_rate=&lt;%= nagios_refresh_rate %&gt;
+&lt;% else %&gt;
 refresh_rate=90
-
-
+&lt;% end %&gt;
 
 # ESCAPE HTML TAGS
 # This option determines whether HTML tags in host and service
 # status output is escaped in the web interface.  If enabled,
 # your plugin output will not be able to contain clickable links.
-
+&lt;% if has_variable?(&quot;nagios_escape_html_tags&quot;) %&gt;
+escape_html_tags=&lt;%= nagios_escape_html_tags %&gt;
+&lt;% else %&gt;
 escape_html_tags=1
-
-
-
+&lt;% end %&gt;
 
 # SOUND OPTIONS
 # These options allow you to specify an optional audio file
@@ -274,17 +298,20 @@ escape_html_tags=1
 #service_unknown_sound=warning.wav
 #normal_sound=noproblem.wav
 
-
-
 # URL TARGET FRAMES
 # These options determine the target frames in which notes and 
 # action URLs will open.
-
+&lt;% if has_variable?(&quot;nagios_action_url_target&quot;) %&gt;
+action_url_target=&lt;%= nagios_action_url_target %&gt;
+&lt;% else %&gt;
 action_url_target=_blank
-notes_url_target=_blank
-
-
+&lt;% end %&gt;
 
+&lt;% if has_variable?(&quot;nagios_notes_url_target&quot;) %&gt;
+notes_url_target=&lt;%= nagios_notes_url_target %&gt;
+&lt;% else %&gt;
+notes_url_target=_blank
+&lt;% end %&gt;
 
 # LOCK AUTHOR NAMES OPTION
 # This option determines whether users can change the author name 
@@ -292,11 +319,11 @@ notes_url_target=_blank
 # author names will be locked into their contact name, as defined in Nagios.
 # Values: 0 = allow editing author names
 #         1 = lock author names (disallow editing)
-
+&lt;% if has_variable?(&quot;nagios_lock_author_names&quot;) %&gt;
+lock_author_names=&lt;%= nagios_lock_author_names %&gt;
+&lt;% else %&gt;
 lock_author_names=1
-
-
-
+&lt;% end %&gt;
 
 # SPLUNK INTEGRATION OPTIONS
 # These options allow you to enable integration with Splunk
@@ -312,7 +339,6 @@ lock_author_names=1
 
 #enable_splunk_integration=1
 
-
 # This option should be the URL used to access your instance of Splunk
 
 #splunk_url=http://127.0.0.1:8000/</diff>
      <filename>templates/cgi.cfg.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+# file managed by puppet
+
 ##############################################################################
 #
 # NAGIOS.CFG - Sample Main Config File for Nagios
@@ -658,7 +660,7 @@ perfdata_timeout=5
 &lt;% if has_variable?(&quot;nagios_retain_state_information&quot;) %&gt;
 retain_state_information=&lt;%= nagios_retain_state_information %&gt;
 &lt;% else %&gt;
-retain_state_information=1
+retain_state_information=0
 &lt;% end %&gt;
 
 # STATE RETENTION FILE
@@ -696,7 +698,7 @@ retention_update_interval=60
 &lt;% if has_variable?(&quot;nagios_use_retained_program_state&quot;) %&gt;
 use_retained_program_state=&lt;%= nagios_use_retained_program_state %&gt;
 &lt;% else %&gt;
-use_retained_program_state=1
+use_retained_program_state=0
 &lt;% end %&gt;
 
 # USE RETAINED SCHEDULING INFO</diff>
      <filename>templates/nagios.cfg.erb</filename>
    </modified>
    <modified>
      <diff>@@ -190,8 +190,8 @@ password=&lt;%= nagios_nsca_password %&gt;
 #	26 = SAFER+
 #
 
-&lt;% if has_variable?(&quot;nsca_decryption_method&quot;) %&gt;
-decryption_method=&lt;%= nsca_decryption_method %&gt;
+&lt;% if has_variable?(&quot;nagios_nsca_decryption_method&quot;) %&gt;
+decryption_method=&lt;%= nagios_nsca_decryption_method %&gt;
 &lt;% else %&gt;
 decryption_method=0
 &lt;% end %&gt;</diff>
      <filename>templates/nsca.cfg.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+# file managed by puppet
+
 ####################################################
 # Sample NSCA Client Config File 
 # Written by: Ethan Galstad (nagios@nagios.org)
@@ -13,14 +15,12 @@
 # IMPORTANT: You don't want all the users on this system to be able
 # to read the password you specify here, so make sure to set
 # restrictive permissions on this config file!
-
-&lt;% if $nsca_password.nil?  %&gt;
-#password=
+&lt;% if has_variable?(&quot;nagios_nsca_password&quot;) %&gt;
+password=&lt;%= nagios_nsca_password %&gt;
 &lt;% else %&gt;
-password=&lt;%= $nsca_password %&gt;
+#password=
 &lt;% end %&gt;
 
-
 # ENCRYPTION METHOD
 # This option determines the method by which the send_nsca client will
 # encrypt the packets it sends to the nsca daemon.  The encryption
@@ -62,9 +62,9 @@ password=&lt;%= $nsca_password %&gt;
 #	26 = SAFER+
 #
 
-&lt;% if $nsca_decryption_method.nil? %&gt;
-encryption_method=0
+&lt;% if has_variable?(&quot;nagios_nsca_encryption_method&quot;) %&gt;
+encryption_method=&lt;%= nagios_nsca_encryption_method %&gt;
 &lt;% else %&gt;
-encryption_method=&lt;%= nsca_decryption_method %&gt;
+encryption_method=0
 &lt;% end %&gt;
 </diff>
      <filename>templates/send_nsca.cfg.erb</filename>
    </modified>
    <modified>
      <diff>@@ -10,4 +10,4 @@
 /usr/bin/printf &quot;%b&quot; &quot;$1\t$2\t$3\n&quot; | &lt;%= nagios_nsca_bin %&gt; -H &lt;%= nagios_nsca_server %&gt; -c &lt;%= nagios_send_nsca_cfg %&gt;
 
 # ** DEBUG **
-# /usr/bin/printf &quot;%b&quot; &quot;[$(date)] &quot; &quot;$1\t$2\t$3\n&quot; &gt;&gt; /tmp/nagios-debug.log
+/usr/bin/printf &quot;%b&quot; &quot;[$(date)] &quot; &quot;$1\t$2\t$3\n&quot; &gt;&gt; /tmp/nagios-debug.log</diff>
      <filename>templates/submit_ochp.erb</filename>
    </modified>
    <modified>
      <diff>@@ -13,4 +13,4 @@
 /usr/bin/printf &quot;%b&quot; &quot;$1\t$2\t$3\t$4\n&quot; | &lt;%= nagios_nsca_bin %&gt; -H &lt;%= nagios_nsca_server %&gt; -c &lt;%= nagios_send_nsca_cfg %&gt;
 
 # ** DEBUG **
-# /usr/bin/printf &quot;%b&quot; &quot;[$(date)] &quot; &quot;$1\t$2\t$3\t$4\n&quot; &gt;&gt; /tmp/nagios-debug.log
+/usr/bin/printf &quot;%b&quot; &quot;[$(date)] &quot; &quot;$1\t$2\t$3\t$4\n&quot; &gt;&gt; /tmp/nagios-debug.log</diff>
      <filename>templates/submit_ocsp.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>15710d0f1f8a21bf63d6e2c91acc9c10f659cdda</id>
    </parent>
  </parents>
  <author>
    <name>Mathieu Bornoz</name>
    <email>mbornoz@sa.camptocamp.com</email>
  </author>
  <url>http://github.com/camptocamp/puppet-nagios/commit/876e5aedf9bd4fdd10b7c47f7744eb4ba1abdded</url>
  <id>876e5aedf9bd4fdd10b7c47f7744eb4ba1abdded</id>
  <committed-date>2008-12-04T07:13:19-08:00</committed-date>
  <authored-date>2008-12-04T07:13:19-08:00</authored-date>
  <message>corrects some issues

 * non-unique namevar on service definitions
 * default parameters in nagios main configuration</message>
  <tree>51d7db840293f568897dab1d29ee9711ecf7d25a</tree>
  <committer>
    <name>Mathieu Bornoz</name>
    <email>mbornoz@sa.camptocamp.com</email>
  </committer>
</commit>
