| 1 |
############################################################################# |
| 2 |
# |
| 3 |
# Sample NRPE Config File |
| 4 |
# |
| 5 |
# Notes: |
| 6 |
# |
| 7 |
# This is a sample configuration file for the NRPE daemon. It needs to be |
| 8 |
# located on the remote host that is running the NRPE daemon, not the host |
| 9 |
# from which the check_nrpe client is being executed. |
| 10 |
# |
| 11 |
############################################################################# |
| 12 |
|
| 13 |
|
| 14 |
# LOG FACILITY |
| 15 |
# The syslog facility that should be used for logging purposes. |
| 16 |
|
| 17 |
log_facility=@log_facility@ |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
# LOG FILE |
| 22 |
# If a log file is specified in this option, nrpe will write to |
| 23 |
# that file instead of using syslog. |
| 24 |
|
| 25 |
#log_file=@logdir@/nrpe.log |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
# DEBUGGING OPTION |
| 30 |
# This option determines whether or not debugging messages are logged to the |
| 31 |
# syslog facility. |
| 32 |
# Values: 0=debugging off, 1=debugging on |
| 33 |
|
| 34 |
debug=0 |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
# PID FILE |
| 39 |
# The name of the file in which the NRPE daemon should write it's process ID |
| 40 |
# number. The file is only written if the NRPE daemon is started by the root |
| 41 |
# user and is running in standalone mode. |
| 42 |
|
| 43 |
pid_file=@piddir@/nrpe.pid |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
# PORT NUMBER |
| 48 |
# Port number we should wait for connections on. |
| 49 |
# NOTE: This must be a non-privileged port (i.e. > 1024). |
| 50 |
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd |
| 51 |
|
| 52 |
server_port=@nrpe_port@ |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
# SERVER ADDRESS |
| 57 |
# Address that nrpe should bind to in case there are more than one interface |
| 58 |
# and you do not want nrpe to bind on all interfaces. |
| 59 |
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd |
| 60 |
|
| 61 |
#server_address=127.0.0.1 |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
# LISTEN QUEUE SIZE |
| 66 |
# Listen queue size (backlog) for serving incoming connections. |
| 67 |
# You may want to increase this value under high load. |
| 68 |
|
| 69 |
#listen_queue_size=5 |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
# NRPE USER |
| 74 |
# This determines the effective user that the NRPE daemon should run as. |
| 75 |
# You can either supply a username or a UID. |
| 76 |
# |
| 77 |
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd |
| 78 |
|
| 79 |
nrpe_user=@nrpe_user@ |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
# NRPE GROUP |
| 84 |
# This determines the effective group that the NRPE daemon should run as. |
| 85 |
# You can either supply a group name or a GID. |
| 86 |
# |
| 87 |
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd |
| 88 |
|
| 89 |
nrpe_group=@nrpe_group@ |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
# ALLOWED HOST ADDRESSES |
| 94 |
# This is an optional comma-delimited list of IP address or hostnames |
| 95 |
# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask |
| 96 |
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently |
| 97 |
# supported. |
| 98 |
# |
| 99 |
# Note: The daemon only does rudimentary checking of the client's IP |
| 100 |
# address. I would highly recommend adding entries in your /etc/hosts.allow |
| 101 |
# file to allow only the specified host to connect to the port |
| 102 |
# you are running this daemon on. |
| 103 |
# |
| 104 |
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd |
| 105 |
|
| 106 |
allowed_hosts=127.0.0.1,::1 |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
# COMMAND ARGUMENT PROCESSING |
| 111 |
# This option determines whether or not the NRPE daemon will allow clients |
| 112 |
# to specify arguments to commands that are executed. This option only works |
| 113 |
# if the daemon was configured with the --enable-command-args configure script |
| 114 |
# option. |
| 115 |
# |
| 116 |
# *** ENABLING THIS OPTION IS A SECURITY RISK! *** |
| 117 |
# Read the SECURITY file for information on some of the security implications |
| 118 |
# of enabling this variable. |
| 119 |
# |
| 120 |
# Values: 0=do not allow arguments, 1=allow command arguments |
| 121 |
|
| 122 |
dont_blame_nrpe=0 |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
# BASH COMMAND SUBSTITUTION |
| 127 |
# This option determines whether or not the NRPE daemon will allow clients |
| 128 |
# to specify arguments that contain bash command substitutions of the form |
| 129 |
# $(...). This option only works if the daemon was configured with both |
| 130 |
# the --enable-command-args and --enable-bash-command-substitution configure |
| 131 |
# script options. |
| 132 |
# |
| 133 |
# *** ENABLING THIS OPTION IS A HIGH SECURITY RISK! *** |
| 134 |
# Read the SECURITY file for information on some of the security implications |
| 135 |
# of enabling this variable. |
| 136 |
# |
| 137 |
# Values: 0=do not allow bash command substitutions, |
| 138 |
# 1=allow bash command substitutions |
| 139 |
|
| 140 |
allow_bash_command_substitution=0 |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
# COMMAND PREFIX |
| 145 |
# This option allows you to prefix all commands with a user-defined string. |
| 146 |
# A space is automatically added between the specified prefix string and the |
| 147 |
# command line from the command definition. |
| 148 |
# |
| 149 |
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! *** |
| 150 |
# Usage scenario: |
| 151 |
# Execute restricted commmands using sudo. For this to work, you need to add |
| 152 |
# the nagios user to your /etc/sudoers. An example entry for allowing |
| 153 |
# execution of the plugins from might be: |
| 154 |
# |
| 155 |
# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ |
| 156 |
# |
| 157 |
# This lets the nagios user run all commands in that directory (and only them) |
| 158 |
# without asking for a password. If you do this, make sure you don't give |
| 159 |
# random users write access to that directory or its contents! |
| 160 |
|
| 161 |
# command_prefix=/usr/bin/sudo |
| 162 |
|
| 163 |
|
| 164 |
# MAX COMMANDS |
| 165 |
# This specifies how many children processes may be spawned at any one |
| 166 |
# time, essentially limiting the fork()s that occur. |
| 167 |
# Default (0) is set to unlimited |
| 168 |
# max_commands=0 |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
# COMMAND TIMEOUT |
| 173 |
# This specifies the maximum number of seconds that the NRPE daemon will |
| 174 |
# allow plugins to finish executing before killing them off. |
| 175 |
|
| 176 |
command_timeout=60 |
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
# CONNECTION TIMEOUT |
| 181 |
# This specifies the maximum number of seconds that the NRPE daemon will |
| 182 |
# wait for a connection to be established before exiting. This is sometimes |
| 183 |
# seen where a network problem stops the SSL being established even though |
| 184 |
# all network sessions are connected. This causes the nrpe daemons to |
| 185 |
# accumulate, eating system resources. Do not set this too low. |
| 186 |
|
| 187 |
connection_timeout=300 |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
# WEAK RANDOM SEED OPTION |
| 192 |
# This directive allows you to use SSL even if your system does not have |
| 193 |
# a /dev/random or /dev/urandom (on purpose or because the necessary patches |
| 194 |
# were not applied). The random number generator will be seeded from a file |
| 195 |
# which is either a file pointed to by the environment valiable $RANDFILE |
| 196 |
# or $HOME/.rnd. If neither exists, the pseudo random number generator will |
| 197 |
# be initialized and a warning will be issued. |
| 198 |
# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness |
| 199 |
|
| 200 |
#allow_weak_random_seed=1 |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
# SSL/TLS OPTIONS |
| 205 |
# These directives allow you to specify how to use SSL/TLS. |
| 206 |
|
| 207 |
# SSL VERSION |
| 208 |
# This can be any of: SSLv2 (only use SSLv2), SSLv2+ (use any version), |
| 209 |
# SSLv3 (only use SSLv3), SSLv3+ (use SSLv3 or above), TLSv1 (only use |
| 210 |
# TLSv1), TLSv1+ (use TLSv1 or above), TLSv1.1 (only use TLSv1.1), |
| 211 |
# TLSv1.1+ (use TLSv1.1 or above), TLSv1.2 (only use TLSv1.2), |
| 212 |
# TLSv1.2+ (use TLSv1.2 or above) |
| 213 |
# If an "or above" version is used, the best will be negotiated. So if both |
| 214 |
# ends are able to do TLSv1.2 and use specify SSLv2, you will get TLSv1.2. |
| 215 |
# If you are using openssl 1.1.0 or above, the SSLv2 options are not available. |
| 216 |
|
| 217 |
#ssl_version=SSLv2+ |
| 218 |
|
| 219 |
# SSL USE ADH |
| 220 |
# This is for backward compatibility and is DEPRECATED. Set to 1 to enable |
| 221 |
# ADH or 2 to require ADH. 1 is currently the default but will be changed |
| 222 |
# in a later version. |
| 223 |
|
| 224 |
#ssl_use_adh=1 |
| 225 |
|
| 226 |
# SSL CIPHER LIST |
| 227 |
# This lists which ciphers can be used. For backward compatibility, this |
| 228 |
# defaults to 'ssl_cipher_list=ALL:!MD5:@STRENGTH' for < OpenSSL 1.1.0, |
| 229 |
# and 'ssl_cipher_list=ALL:!MD5:@STRENGTH:@SECLEVEL=0' for OpenSSL 1.1.0 and |
| 230 |
# greater. |
| 231 |
|
| 232 |
#ssl_cipher_list=ALL:!MD5:@STRENGTH |
| 233 |
#ssl_cipher_list=ALL:!MD5:@STRENGTH:@SECLEVEL=0 |
| 234 |
#ssl_cipher_list=ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:@STRENGTH |
| 235 |
|
| 236 |
# SSL Certificate and Private Key Files |
| 237 |
|
| 238 |
#ssl_cacert_file=/etc/ssl/servercerts/ca-cert.pem |
| 239 |
#ssl_cert_file=/etc/ssl/servercerts/nagios-cert.pem |
| 240 |
#ssl_privatekey_file=/etc/ssl/servercerts/nagios-key.pem |
| 241 |
|
| 242 |
# SSL USE CLIENT CERTS |
| 243 |
# This options determines client certificate usage. |
| 244 |
# Values: 0 = Don't ask for or require client certificates (default) |
| 245 |
# 1 = Ask for client certificates |
| 246 |
# 2 = Require client certificates |
| 247 |
|
| 248 |
#ssl_client_certs=0 |
| 249 |
|
| 250 |
# SSL LOGGING |
| 251 |
# This option determines which SSL messages are send to syslog. OR values |
| 252 |
# together to specify multiple options. |
| 253 |
|
| 254 |
# Values: 0x00 (0) = No additional logging (default) |
| 255 |
# 0x01 (1) = Log startup SSL/TLS parameters |
| 256 |
# 0x02 (2) = Log remote IP address |
| 257 |
# 0x04 (4) = Log SSL/TLS version of connections |
| 258 |
# 0x08 (8) = Log which cipher is being used for the connection |
| 259 |
# 0x10 (16) = Log if client has a certificate |
| 260 |
# 0x20 (32) = Log details of client's certificate if it has one |
| 261 |
# -1 or 0xff or 0x2f = All of the above |
| 262 |
|
| 263 |
#ssl_logging=0x00 |
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
# NASTY METACHARACTERS |
| 268 |
# This option allows you to override the list of characters that cannot |
| 269 |
# be passed to the NRPE daemon. |
| 270 |
|
| 271 |
# nasty_metachars=|`&><'\\[]{};\r\n |
| 272 |
|
| 273 |
# This option allows you to enable or disable logging error messages to the syslog facilities. |
| 274 |
# If this option is not set, the error messages will be logged. |
| 275 |
disable_syslog=0 |
| 276 |
|
| 277 |
# COMMAND DEFINITIONS |
| 278 |
# Command definitions that this daemon will run. Definitions |
| 279 |
# are in the following format: |
| 280 |
# |
| 281 |
# command[<command_name>]=<command_line> |
| 282 |
# |
| 283 |
# When the daemon receives a request to return the results of <command_name> |
| 284 |
# it will execute the command specified by the <command_line> argument. |
| 285 |
# |
| 286 |
# Unlike Nagios, the command line cannot contain macros - it must be |
| 287 |
# typed exactly as it should be executed. |
| 288 |
# |
| 289 |
# Note: Any plugins that are used in the command lines must reside |
| 290 |
# on the machine that this daemon is running on! The examples below |
| 291 |
# assume that you have plugins installed in a /usr/local/nagios/libexec |
| 292 |
# directory. Also note that you will have to modify the definitions below |
| 293 |
# to match the argument format the plugins expect. Remember, these are |
| 294 |
# examples only! |
| 295 |
|
| 296 |
|
| 297 |
# The following examples use hardcoded command arguments... |
| 298 |
# This is by far the most secure method of using NRPE |
| 299 |
|
| 300 |
command[check_users]=@pluginsdir@/check_users -w 5 -c 10 |
| 301 |
command[check_load]=@pluginsdir@/check_load -r -w .15,.10,.05 -c .30,.25,.20 |
| 302 |
command[check_hda1]=@pluginsdir@/check_disk -w 20% -c 10% -p /dev/hda1 |
| 303 |
command[check_zombie_procs]=@pluginsdir@/check_procs -w 5 -c 10 -s Z |
| 304 |
command[check_total_procs]=@pluginsdir@/check_procs -w 150 -c 200 |
| 305 |
|
| 306 |
|
| 307 |
# The following examples allow user-supplied arguments and can |
| 308 |
# only be used if the NRPE daemon was compiled with support for |
| 309 |
# command arguments *AND* the dont_blame_nrpe directive in this |
| 310 |
# config file is set to '1'. This poses a potential security risk, so |
| 311 |
# make sure you read the SECURITY file before doing this. |
| 312 |
|
| 313 |
### MISC SYSTEM METRICS ### |
| 314 |
#command[check_users]=@pluginsdir@/check_users $ARG1$ |
| 315 |
#command[check_load]=@pluginsdir@/check_load $ARG1$ |
| 316 |
#command[check_disk]=@pluginsdir@/check_disk $ARG1$ |
| 317 |
#command[check_swap]=@pluginsdir@/check_swap $ARG1$ |
| 318 |
#command[check_cpu_stats]=@pluginsdir@/check_cpu_stats.sh $ARG1$ |
| 319 |
#command[check_mem]=@pluginsdir@/custom_check_mem -n $ARG1$ |
| 320 |
|
| 321 |
### GENERIC SERVICES ### |
| 322 |
#command[check_init_service]=sudo @pluginsdir@/check_init_service $ARG1$ |
| 323 |
#command[check_services]=@pluginsdir@/check_services -p $ARG1$ |
| 324 |
|
| 325 |
### SYSTEM UPDATES ### |
| 326 |
#command[check_yum]=@pluginsdir@/check_yum |
| 327 |
#command[check_apt]=@pluginsdir@/check_apt |
| 328 |
|
| 329 |
### PROCESSES ### |
| 330 |
#command[check_all_procs]=@pluginsdir@/custom_check_procs |
| 331 |
#command[check_procs]=@pluginsdir@/check_procs $ARG1$ |
| 332 |
|
| 333 |
### OPEN FILES ### |
| 334 |
#command[check_open_files]=@pluginsdir@/check_open_files.pl $ARG1$ |
| 335 |
|
| 336 |
### NETWORK CONNECTIONS ### |
| 337 |
#command[check_netstat]=@pluginsdir@/check_netstat.pl -p $ARG1$ $ARG2$ |
| 338 |
|
| 339 |
### ASTERISK ### |
| 340 |
#command[check_asterisk]=@pluginsdir@/check_asterisk.pl $ARG1$ |
| 341 |
#command[check_sip]=@pluginsdir@/check_sip $ARG1$ |
| 342 |
#command[check_asterisk_sip_peers]=sudo @pluginsdir@/check_asterisk_sip_peers.sh $ARG1$ |
| 343 |
#command[check_asterisk_version]=@pluginsdir@/nagisk.pl -c version |
| 344 |
#command[check_asterisk_peers]=@pluginsdir@/nagisk.pl -c peers |
| 345 |
#command[check_asterisk_channels]=@pluginsdir@/nagisk.pl -c channels |
| 346 |
#command[check_asterisk_zaptel]=@pluginsdir@/nagisk.pl -c zaptel |
| 347 |
#command[check_asterisk_span]=@pluginsdir@/nagisk.pl -c span -s 1 |
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
# INCLUDE CONFIG FILE |
| 352 |
# This directive allows you to include definitions from an external config file. |
| 353 |
|
| 354 |
#include=<somefile.cfg> |
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
# INCLUDE CONFIG DIRECTORY |
| 359 |
# This directive allows you to include definitions from config files (with a |
| 360 |
# .cfg extension) in one or more directories (with recursion). |
| 361 |
|
| 362 |
#include_dir=<somedirectory> |
| 363 |
#include_dir=<someotherdirectory> |
| 364 |
|
| 365 |
# KEEP ENVIRONMENT VARIABLES |
| 366 |
# This directive allows you to retain specific variables from the environment |
| 367 |
# when starting the NRPE daemon. |
| 368 |
|
| 369 |
#keep_env_vars=NRPE_MULTILINESUPPORT,NRPE_PROGRAMVERSION |