TracNav menu
-
Home
-
Documentation
- …
-
Information
- …
-
Commands/Modules
-
CheckDisk
- CheckFileSize
- CheckDriveSize
- CheckFile
-
CheckEventLog
- CheckEventLog
-
CheckSystem
- CheckCPU
- CheckUpTime
- CheckServiceState
- CheckProcState
- CheckMem
- CheckCounter
-
CheckHelpers
- CheckAlwaysOK
- CheckAlwaysCRITICAL
- CheckAlwaysWARNING
- CheckOK
- CheckCRITICAL
- CheckWARNING
- CheckMultiple
- CheckVersion
-
CheckTaskSched
- CheckTaskSched
-
FileLogger
- N/A
-
NRPEListener
- N/A
-
NSClientListener
- N/A
-
SysTray
- N/A
-
CheckWMI
- CheckWMI
- CheckWMIValue
-
RemoteConfiguration
- N/A
-
CheckExternalScripts
- N/A
-
LUAScript
- Guide
-
NSCAAgent
- N/A
-
Donate
- …
NRPEListener.dll
This module accepts incoming NRPE connections and responds by executing various checks and returns their result. To use this you need to have check_nrpe or another NRPE client. This is similar to check_nt (NSClient) but much more flexible and supports encryption. This only drawback is that it lacks any authorization.
As this module has the ability to generate command handlers by configuration there are command handlers but nothing built in. This is present for compatiblity only it is suggested to use the [CheckExternalScripts] instead.
Configuration
NRPE
This is configuration for the NRPE module that controls how the NRPE listener operates.
| Option | Default value | Description |
| port | 5666 | The port to listen to |
| allowed_hosts | A list (coma separated) with hosts that are allowed to poll information from NRPE. This will replace the one found under Setting for NRPE if present. If not present the same option found under Settings will be used. If both are blank all hosts will be allowed to access the system | |
| use_ssl | 1 | Boolean value to toggle SSL encryption on the socket connection |
| bind_to_address | The address to bind to when listening to sockets. | |
| command_timeout | 60 | The maximum time in seconds that a command can execute. (if more then this execution will be aborted). NOTICE this only affects external commands not internal ones. |
| allow_arguments | 0 | A Boolean flag to determine if arguments are accepted on the incoming socket. If arguments are not accepted you can still use external commands that need arguments but you have to define them in the NRPE handlers below. This is similar to the NRPE "dont_blame_nrpe" option. |
| allow_nasty_meta_chars | 0 | Allow NRPE execution to have “nasty” meta characters that might affect execution of external commands (things like > “ etc). |
| socket_timeout | 30 | The timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out. and discard the connection. |
| script_dir | Load all scripts in a directory and use them as commands. Probably dangerous but usefull if you have loads of scripts :) |
Advanced options:
| Option | Default value | Description |
| performance_data | 1 | Send performance data back to nagios (set this to 0 to remove all performance data) |
| socket_back_log | Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts. This is an advanced option and should not be used. | |
| string_length | 1024 | Length of payload to/from the NRPE agent. This is a hard specific value so you have to "configure" (read recompile) your NRPE agent to use the same value for it to work. |
NRPE Handlers (External commands)
This module can add two types of command handlers.
First there are external command handlers that execute a separate program or script and simply return the output and return status from that. The other possibility is to create an alias for an internal command.
To add an external command you add a command definition under the “NRPE Handlers” section. A command definition has the following syntax:
[NRPE Handlers] command_name=/some/executable with some arguments test_batch_file=c:\test.bat foo $ARG1$ bar
The above example will on an incoming “test_batch_file” execute the c:\test.bat file and return the output as text and the return code as the Nagios status.
To add an internal command or alias is perhaps a better word. You add a command definition under the “NRPE Handlers” section. A command definition with the following syntax:
command_name=inject some_other_command with some arguments check_cpu=inject checkCPU warn=80 crit=90 5 10 15
The above example will on an incoming “check_cpu” execute the internal command “checkCPU” with predefined arguments give in the command definition.
