nrpe.cfg.erb 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. ######################################################################################
  2. # etc/nagios/nrpe.cfg config file template. Based on the file included in
  3. # the Icinga apt package
  4. # Autogenerated by Puppet
  5. # (c) Nicholas Chappell, 2014
  6. ######################################################################################
  7. ###########################################
  8. # !!!WARNING!!! #
  9. ###########################################
  10. # This file is automatically generated by #
  11. # Puppet. Any manual changes made to it #
  12. # **WILL** get overwritten! #
  13. ###########################################
  14. #############################################################################
  15. # Sample NRPE Config File
  16. # Written by: Ethan Galstad (nagios@nagios.org)
  17. #
  18. # Last Modified: 11-23-2007
  19. #
  20. # NOTES:
  21. # This is a sample configuration file for the NRPE daemon. It needs to be
  22. # located on the remote host that is running the NRPE daemon, not the host
  23. # from which the check_nrpe client is being executed.
  24. #############################################################################
  25. # LOG FACILITY
  26. # The syslog facility that should be used for logging purposes.
  27. log_facility=<%= scope.lookupvar('icinga2::nrpe::nrpe_log_facility') %>
  28. # PID FILE
  29. # The name of the file in which the NRPE daemon should write it's process ID
  30. # number. The file is only written if the NRPE daemon is started by the root
  31. # user and is running in standalone mode.
  32. pid_file=<%= scope.lookupvar('icinga2::nrpe::nrpe_pid_file_path') %>
  33. # PORT NUMBER
  34. # Port number we should wait for connections on.
  35. # NOTE: This must be a non-priviledged port (i.e. > 1024).
  36. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd
  37. server_port=<%= scope.lookupvar('icinga2::nrpe::nrpe_listen_port') %>
  38. # SERVER ADDRESS
  39. # Address that nrpe should bind to in case there are more than one interface
  40. # and you do not want nrpe to bind on all interfaces.
  41. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd
  42. #server_address=127.0.0.1
  43. # NRPE USER
  44. # This determines the effective user that the NRPE daemon should run as
  45. # You can either supply a username or a UID.
  46. #
  47. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd
  48. nrpe_user=<%= scope.lookupvar('icinga2::nrpe::nrpe_user') %>
  49. # NRPE GROUP
  50. # This determines the effective group that the NRPE daemon should run as.
  51. # You can either supply a group name or a GID.
  52. #
  53. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd
  54. nrpe_group=<%= scope.lookupvar('icinga2::nrpe::nrpe_group') %>
  55. # ALLOWED HOST ADDRESSES
  56. # This is an optional comma-delimited list of IP address or hostnames
  57. # that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
  58. # (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
  59. # supported.
  60. #
  61. # Note: The daemon only does rudimentary checking of the client's IP
  62. # address. I would highly recommend adding entries in your /etc/hosts.allow
  63. # file to allow only the specified host to connect to the port
  64. # you are running this daemon on.
  65. #
  66. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd
  67. allowed_hosts=<%= scope.lookupvar('icinga2::nrpe::nrpe_allowed_hosts').join(',') %>
  68. # COMMAND ARGUMENT PROCESSING
  69. # This option determines whether or not the NRPE daemon will allow clients
  70. # to specify arguments to commands that are executed. This option only works
  71. # if the daemon was configured with the --enable-command-args configure script
  72. # option.
  73. #
  74. # *** ENABLING THIS OPTION IS A SECURITY RISK! ***
  75. # Read the SECURITY file for information on some of the security implications
  76. # of enabling this variable.
  77. #
  78. # Values: 0=do not allow arguments, 1=allow command arguments
  79. dont_blame_nrpe=<%= scope.lookupvar('icinga2::nrpe::nrpe_allow_command_argument_processing') %>
  80. # COMMAND PREFIX
  81. # This option allows you to prefix all commands with a user-defined string.
  82. # A space is automatically added between the specified prefix string and the
  83. # command line from the command definition.
  84. #
  85. # *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
  86. # Usage scenario:
  87. # Execute restricted commmands using sudo. For this to work, you need to add
  88. # the nagios user to your /etc/sudoers. An example entry for alllowing
  89. # execution of the plugins from might be:
  90. #
  91. # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
  92. #
  93. # This lets the nagios user run all commands in that directory (and only them)
  94. # without asking for a password. If you do this, make sure you don't give
  95. # random users write access to that directory or its contents!
  96. # command_prefix=/usr/bin/sudo
  97. # DEBUGGING OPTION
  98. # This option determines whether or not debugging messages are logged to the
  99. # syslog facility.
  100. # Values: 0=debugging off, 1=debugging on
  101. debug=<%= scope.lookupvar('icinga2::nrpe::nrpe_debug_level') %>
  102. # COMMAND TIMEOUT
  103. # This specifies the maximum number of seconds that the NRPE daemon will
  104. # allow plugins to finish executing before killing them off.
  105. command_timeout=<%= scope.lookupvar('icinga2::nrpe::nrpe_command_timeout') %>
  106. # CONNECTION TIMEOUT
  107. # This specifies the maximum number of seconds that the NRPE daemon will
  108. # wait for a connection to be established before exiting. This is sometimes
  109. # seen where a network problem stops the SSL being established even though
  110. # all network sessions are connected. This causes the nrpe daemons to
  111. # accumulate, eating system resources. Do not set this too low.
  112. connection_timeout=<%= scope.lookupvar('icinga2::nrpe::nrpe_connection_timeout') %>
  113. # WEEK RANDOM SEED OPTION
  114. # This directive allows you to use SSL even if your system does not have
  115. # a /dev/random or /dev/urandom (on purpose or because the necessary patches
  116. # were not applied). The random number generator will be seeded from a file
  117. # which is either a file pointed to by the environment valiable $RANDFILE
  118. # or $HOME/.rnd. If neither exists, the pseudo random number generator will
  119. # be initialized and a warning will be issued.
  120. # Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness
  121. #allow_weak_random_seed=1
  122. # INCLUDE CONFIG FILE
  123. # This directive allows you to include definitions from an external config file.
  124. #include=<somefile.cfg>
  125. # INCLUDE CONFIG DIRECTORY
  126. # This directive allows you to include definitions from config files (with a
  127. # .cfg extension) in one or more directories (with recursion).
  128. #include_dir=<somedirectory>
  129. #include_dir=<someotherdirectory>
  130. # COMMAND DEFINITIONS
  131. # Command definitions that this daemon will run. Definitions
  132. # are in the following format:
  133. #
  134. # command[<command_name>]=<command_line>
  135. #
  136. # When the daemon receives a request to return the results of <command_name>
  137. # it will execute the command specified by the <command_line> argument.
  138. #
  139. # Unlike Nagios, the command line cannot contain macros - it must be
  140. # typed exactly as it should be executed.
  141. #
  142. # Note: Any plugins that are used in the command lines must reside
  143. # on the machine that this daemon is running on! The examples below
  144. # assume that you have plugins installed in a /usr/local/nagios/libexec
  145. # directory. Also note that you will have to modify the definitions below
  146. # to match the argument format the plugins expect. Remember, these are
  147. # examples only!
  148. # The following examples use hardcoded command arguments...
  149. #command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
  150. #command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
  151. #command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
  152. #command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
  153. #command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
  154. # The following examples allow user-supplied arguments and can
  155. # only be used if the NRPE daemon was compiled with support for
  156. # command arguments *AND* the dont_blame_nrpe directive in this
  157. # config file is set to '1'. This poses a potential security risk, so
  158. # make sure you read the SECURITY file before doing this.
  159. #command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
  160. #command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
  161. #command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
  162. #command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
  163. #
  164. # local configuration:
  165. # if you'd prefer, you can instead place directives here
  166. #include=/etc/nagios/nrpe_local.cfg
  167. #
  168. # you can place your config snipplets into nrpe.d/
  169. # only snipplets ending in .cfg will get included
  170. include_dir=/etc/nagios/nrpe.d/