Ovreview
DEPRECATED This part of the module is deprecated and should not be used. Refer to the [CheckExternalScripts] module instead. 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 command[check_svc]=inject CheckService checkAll
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.
Alias (builtin commands)
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.
NRPE_NT Syntax
To leverage existing infrastructure you can copy your old definitions from NRPE_NT as-is. Thus the following:
command[check_svc]=inject CheckService checkAll
translates into a command called check_svc with the following definition:
CheckServcice checkAll







