CheckExternalScripts/config/external_script

Overview

Configure how the External Scripts module works (not to be confused with the "External Scripts" section below that holds scripts that can be run.

OptionDefault valueDescription
command_timeout60The maximum time in seconds that a command can execute.
allow_arguments0A Boolean flag to determine if arguments are accepted on the command line.
allow_nasty_meta_chars0Allow NRPE execution to have “nasty” meta characters that might affect execution of external commands.
script_dir When set all files in this directory will be available as scripts. WARNING
command_timeout

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.

Values:

Any number (positive integer) representing time in seconds.

Default
60 (seconds).
Example
Set timeout to 120 seconds
[External Script]
command_timeout=120
allow_arguments

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.

Values

ValueMeaning
0Disallow arguments for commands
1Allow arguments for commands
Default
0 (false).
Example
Allow arguments
[External Script]
allow_arguments=1
allow_nasty_meta_chars

Allow NRPE execution to have “nasty” meta characters that might affect execution of external commands (things like > “ etc).

Values
This list contain all possible values
ValueMeaning
0Disallow nasty arguments for commands
1Allow nasty arguments for commands
Default
0 (false)
Example
Allow nasty arguments
[External Script]
allow_nasty_meta_chars=1
script_dir

When set all files in this directory will be available as scripts. This is pretty dangerous but can be a bit useful if you use many scripts and you are sure no one else can add files there.

Value
Any directory (can be relative to NSClient++)
Default
Empty (meaning no scripts are added)
Example
All scripts ending with bat in the scripts folder (of NSClient++ installation directory) will be added as scripts.

[External Script]
script_dir=.\scripts\*.bat