| 98 | | === Sample configuration === |
| 99 | | This is the default sample confiuration file |
| 100 | | {{{ |
| 101 | | [modules] |
| 102 | | ;# NSCLIENT++ MODULES |
| 103 | | ;# A list with DLLs to load at startup. |
| 104 | | ; You will need to enable some of these for NSClient++ to work. |
| 105 | | ; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! |
| 106 | | ; * * |
| 107 | | ; * N O T I C E ! ! ! - Y O U H A V E T O E D I T T H I S * |
| 108 | | ; * * |
| 109 | | ; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! |
| 110 | | ;FileLogger.dll |
| 111 | | ;CheckSystem.dll |
| 112 | | ;CheckDisk.dll |
| 113 | | ;NSClientListener.dll |
| 114 | | ;NRPEListener.dll |
| 115 | | ;SysTray.dll |
| 116 | | ;CheckEventLog.dll |
| 117 | | ;CheckHelpers.dll |
| 118 | | ; |
| 119 | | ; CheckWMI IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS! |
| 120 | | ;CheckWMI.dll |
| 121 | | |
| 122 | | [Settings] |
| 123 | | ;# OBFUSCATED PASSWORD |
| 124 | | ; This is the same as the password option but here you can store the password in an obfuscated manner. |
| 125 | | ; *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the |
| 126 | | ; password. Its just a bit harder to do it at first glance. |
| 127 | | ;obfuscated_password=Jw0KAUUdXlAAUwASDAAB |
| 128 | | ; |
| 129 | | ;# PASSWORD |
| 130 | | ; This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly. |
| 131 | | ;password=secret-password |
| 132 | | ; |
| 133 | | ;# ALLOWED HOST ADDRESSES |
| 134 | | ; This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons. |
| 135 | | ; If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password). |
| 136 | | ;allowed_hosts=127.0.0.1 |
| 137 | | |
| 138 | | [log] |
| 139 | | ;# LOG DEBUG |
| 140 | | ; Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test) |
| 141 | | ;debug=1 |
| 142 | | ; |
| 143 | | ;# LOG FILE |
| 144 | | ; The file to print log statements to |
| 145 | | ;file=NSC.log |
| 146 | | ; |
| 147 | | ;# LOG DATE MASK |
| 148 | | ; The format to for the date/time part of the log entry written to file. |
| 149 | | ;date_mask=%Y-%m-%d %H:%M:%S |
| 150 | | |
| 151 | | |
| 152 | | [NSClient] |
| 153 | | ;# NSCLIENT PORT NUMBER |
| 154 | | ; This is the port the NSClientListener.dll will listen to. |
| 155 | | ;port=12489 |
| 156 | | |
| 157 | | |
| 158 | | [Check System] |
| 159 | | ;# CPU BUFFER SIZE |
| 160 | | ; Can be anything ranging from 1s (for 1 second) to 10w for 10 weeks. Notice that a larger buffer will waste memory |
| 161 | | ; so don't use a larger buffer then you need (ie. the longest check you do +1). |
| 162 | | ;CPUBufferSize=1h |
| 163 | | ; |
| 164 | | ;# CHECK RESOLUTION |
| 165 | | ; The resolution to check values (currently only CPU). |
| 166 | | ; The value is entered in 1/10:th of a second and the default is 10 (which means ones every second) |
| 167 | | ;CheckResolution=10 |
| 168 | | |
| 169 | | [NRPE] |
| 170 | | ;# NRPE PORT NUMBER |
| 171 | | ; This is the port the NRPEListener.dll will listen to. |
| 172 | | ;port=5666 |
| 173 | | ; |
| 174 | | ;# COMMAND TIMEOUT |
| 175 | | ; This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off. |
| 176 | | ;command_timeout=60 |
| 177 | | ; |
| 178 | | ;# COMMAND ARGUMENT PROCESSING |
| 179 | | ; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed. |
| 180 | | ;allow_arguments=0 |
| 181 | | ; |
| 182 | | ;# COMMAND ALLOW NASTY META CHARS |
| 183 | | ; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments. |
| 184 | | ;allow_nasty_meta_chars=0 |
| 185 | | ; |
| 186 | | ;# USE SSL SOCKET |
| 187 | | ; This option controls if SSL should be used on the socket. |
| 188 | | ;use_ssl=1 |
| 189 | | |
| 190 | | [NRPE Handlers] |
| 191 | | ;# COMMAND DEFINITIONS |
| 192 | | ;# Command definitions that this daemon will run. |
| 193 | | ;# Can be either NRPE syntax: |
| 194 | | ;command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 |
| 195 | | ;# Or simplified syntax: |
| 196 | | ;test=c:\test.bat foo $ARG1$ bar |
| 197 | | ;check_disk1=/usr/local/nagios/libexec/check_disk -w 5 -c 10 |
| 198 | | ;# Or even loopback (inject) syntax (to run internal commands) |
| 199 | | ;# This is a way to run "NSClient" commands and other internal module commands such as check eventlog etc. |
| 200 | | ;check_cpu=inject checkCPU warn=80 crit=90 5 10 15 |
| 201 | | ;check_eventlog=inject CheckEventLog Application warn.require.eventType=error warn.require.eventType=warning critical.require.eventType=error critical.exclude.eventType=info truncate=1024 descriptions |
| 202 | | ;check_disk_c=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M File:WIN=c:\ATI\*.* |
| 203 | | ;# But be careful: |
| 204 | | ; dont_check=inject dont_check This will "loop forever" so be careful with the inject command... |
| 205 | | ;# Check some escapings... |
| 206 | | ; check_escape=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M "File: foo \" WIN=c:\\WINDOWS\\*.*" |
| 207 | | }}} |
| | 90 | == NSCA Agent == |
| | 91 | |
| | 92 | == NSCA Commands == |
| | 93 | |
| | 94 | === NRPE Handlers === |
| | 95 | This is a list of handlers for NRPE execution this can of course be used by any module (such as NSClient) but for historical reasons they are located in this section especially as NRPE plug-in is the one that does the actual execution. |
| | 96 | |
| | 97 | The handlers can have two different syntaxes: |
| | 98 | |
| | 99 | * command[my_command]=/some/executable |
| | 100 | * my_command=/some/executable<br>The latter is the preferred way as it is shorter. |