This site is deprecated. The new site can be found here: http://nsclient.org.
For specific sections: issues (existing issues will be handled here), forums, news, documentation.

TracNav

Check External Scripts

A simple wrapper to run external scripts and batch files.

Queries (commands)

Commands (executable)

TODO: Add command list

Configuration

EXTERNAL SCRIPT WRAPPINGS SECTION

A list of templates for wrapped scripts

Section: /settings/external scripts/wrappings

Keys:

KeyTitleDescription
vbsVISUAL BASIC WRAPPING
batBATCH FILE WRAPPING
ps1POWERSHELL WRAPPING

Sample:

# EXTERNAL SCRIPT WRAPPINGS SECTION
# A list of templates for wrapped scripts
[/settings/external scripts/wrappings]
# VISUAL BASIC WRAPPING
# 
vbs=cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
# BATCH FILE WRAPPING
# 
bat=scripts\\%SCRIPT% %ARGS%
# POWERSHELL WRAPPING
# 
ps1=cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

VISUAL BASIC WRAPPING

Description:

Key: vbs

Default value: cscript.exe T:30 NoLogo scripts
lib
wrapper.vbs %SCRIPT% %ARGS%

Used by: CheckExternalScripts

Sample:

# VISUAL BASIC WRAPPING
# 
[CheckExternalScripts]
vbs=cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%

BATCH FILE WRAPPING

Description:

Key: bat

Default value: scripts
%SCRIPT% %ARGS%

Used by: CheckExternalScripts

Sample:

# BATCH FILE WRAPPING
# 
[CheckExternalScripts]
bat=scripts\\%SCRIPT% %ARGS%

POWERSHELL WRAPPING

Description:

Key: ps1

Default value: cmd /c echo scripts
%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

Used by: CheckExternalScripts

Sample:

# POWERSHELL WRAPPING
# 
[CheckExternalScripts]
ps1=cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

EXTERNAL SCRIPT SCRIPT SECTION

A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>

Section: /settings/external scripts/scripts

Sample:

# EXTERNAL SCRIPT SCRIPT SECTION
# A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]

EXTERNAL SCRIPT SECTION

Section for external scripts configuration options (CheckExternalScripts).

Section: /settings/external scripts

Keys:

KeyTitleDescription
timeoutCOMMAND 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.
allow argumentsCOMMAND ARGUMENT PROCESSING This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
script pathSCRIPT DIRECTORY Load all scripts in a directory and use them as commands. Probably dangerous but useful if you have loads of scripts :)
allow nasty charactersCOMMAND ALLOW NASTY META CHARS This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.

Sample:

# EXTERNAL SCRIPT SECTION
# Section for external scripts configuration options (CheckExternalScripts).
[/settings/external scripts]
# 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.
timeout=60
# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments=0
# SCRIPT DIRECTORY
# Load all scripts in a directory and use them as commands. Probably dangerous but useful if you have loads of scripts :)
script path=
# COMMAND ALLOW NASTY META CHARS
# This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters=0

COMMAND TIMEOUT

Description: 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.

Key: timeout

Default value: 60

Used by: CheckExternalScripts

Sample:

# 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.
[CheckExternalScripts]
timeout=60

COMMAND ARGUMENT PROCESSING

Description: This option determines whether or not the we will allow clients to specify arguments to commands that are executed.

Key: allow arguments

Default value: 0

Used by: CheckExternalScripts

Sample:

# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
[CheckExternalScripts]
allow arguments=0

SCRIPT DIRECTORY

Description: Load all scripts in a directory and use them as commands. Probably dangerous but useful if you have loads of scripts :)

Key: script path

Used by: CheckExternalScripts

Sample:

# SCRIPT DIRECTORY
# Load all scripts in a directory and use them as commands. Probably dangerous but useful if you have loads of scripts :)
[CheckExternalScripts]
script path=

COMMAND ALLOW NASTY META CHARS

Description: This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.

Key: allow nasty characters

Default value: 0

Used by: CheckExternalScripts

Sample:

# COMMAND ALLOW NASTY META CHARS
# This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
[CheckExternalScripts]
allow nasty characters=0

EXTERNAL SCRIPT WRAPPED SCRIPTS SECTION

A list of wrappped scripts (ie. using the template mechanism)

Section: /settings/external scripts/wrapped scripts

Sample:

# EXTERNAL SCRIPT WRAPPED SCRIPTS SECTION
# A list of wrappped scripts (ie. using the template mechanism)
[/settings/external scripts/wrapped scripts]

EXTERNAL SCRIPT ALIAS SECTION

A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)

Section: /settings/external scripts/alias

Keys:

KeyTitleDescription
alias_file_sizealias_file_size Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
alias_sched_allalias_sched_all Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
alias_process_hungalias_process_hung Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
alias_service_exalias_service_ex Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
alias_cpu_exalias_cpu_ex Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
alias_sched_taskalias_sched_task Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
alias_servicealias_service Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_event_logalias_event_log Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
alias_volumes_loosealias_volumes_loose Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
alias_file_agealias_file_age Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
alias_process_stoppedalias_process_stopped Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
alias_diskalias_disk Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_upalias_up Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
alias_process_countalias_process_count Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
alias_memalias_mem Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_disk_loosealias_disk_loose Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_cpualias_cpu Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
check_okcheck_ok Alias for check_ok. To configure this item add a section called: /settings/external scripts/alias/check_ok
defaultdefault Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
alias_volumesalias_volumes Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_sched_longalias_sched_long Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
alias_updatesalias_updates Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates
alias_processalias_process Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process

Sample:

# EXTERNAL SCRIPT ALIAS SECTION
# A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]
# alias_file_size
# Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
alias_file_size=
# alias_sched_all
# Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
alias_sched_all=
# alias_process_hung
# Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
alias_process_hung=
# alias_service_ex
# Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
alias_service_ex=
# alias_cpu_ex
# Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
alias_cpu_ex=
# alias_sched_task
# Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
alias_sched_task=
# alias_service
# Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_service=
# alias_event_log
# Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
alias_event_log=
# alias_volumes_loose
# Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
alias_volumes_loose=
# alias_file_age
# Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
alias_file_age=
# alias_process_stopped
# Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
alias_process_stopped=
# alias_disk
# Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk=
# alias_up
# Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
alias_up=
# alias_process_count
# Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
alias_process_count=
# alias_mem
# Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_mem=
# alias_disk_loose
# Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_disk_loose=
# alias_cpu
# Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu=
# check_ok
# Alias for check_ok. To configure this item add a section called: /settings/external scripts/alias/check_ok
check_ok=
# default
# Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
default=
# alias_volumes
# Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_volumes=
# alias_sched_long
# Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
alias_sched_long=
# alias_updates
# Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates
alias_updates=
# alias_process
# Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
alias_process=

alias_file_size

Description: Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size

Key: alias_file_size

Used by: CheckExternalScripts

Sample:

# alias_file_size
# Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
[CheckExternalScripts]
alias_file_size=

alias_sched_all

Description: Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all

Key: alias_sched_all

Used by: CheckExternalScripts

Sample:

# alias_sched_all
# Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
[CheckExternalScripts]
alias_sched_all=

alias_process_hung

Description: Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung

Key: alias_process_hung

Used by: CheckExternalScripts

Sample:

# alias_process_hung
# Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
[CheckExternalScripts]
alias_process_hung=

alias_service_ex

Description: Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex

Key: alias_service_ex

Used by: CheckExternalScripts

Sample:

# alias_service_ex
# Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
[CheckExternalScripts]
alias_service_ex=

alias_cpu_ex

Description: Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex

Key: alias_cpu_ex

Used by: CheckExternalScripts

Sample:

# alias_cpu_ex
# Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
[CheckExternalScripts]
alias_cpu_ex=

alias_sched_task

Description: Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task

Key: alias_sched_task

Used by: CheckExternalScripts

Sample:

# alias_sched_task
# Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
[CheckExternalScripts]
alias_sched_task=

alias_service

Description: Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service

Key: alias_service

Used by: CheckExternalScripts

Sample:

# alias_service
# Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
[CheckExternalScripts]
alias_service=

alias_event_log

Description: Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log

Key: alias_event_log

Used by: CheckExternalScripts

Sample:

# alias_event_log
# Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
[CheckExternalScripts]
alias_event_log=

alias_volumes_loose

Description: Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose

Key: alias_volumes_loose

Used by: CheckExternalScripts

Sample:

# alias_volumes_loose
# Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
[CheckExternalScripts]
alias_volumes_loose=

alias_file_age

Description: Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age

Key: alias_file_age

Used by: CheckExternalScripts

Sample:

# alias_file_age
# Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
[CheckExternalScripts]
alias_file_age=

alias_process_stopped

Description: Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped

Key: alias_process_stopped

Used by: CheckExternalScripts

Sample:

# alias_process_stopped
# Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
[CheckExternalScripts]
alias_process_stopped=

alias_disk

Description: Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk

Key: alias_disk

Used by: CheckExternalScripts

Sample:

# alias_disk
# Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
[CheckExternalScripts]
alias_disk=

alias_up

Description: Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up

Key: alias_up

Used by: CheckExternalScripts

Sample:

# alias_up
# Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
[CheckExternalScripts]
alias_up=

alias_process_count

Description: Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count

Key: alias_process_count

Used by: CheckExternalScripts

Sample:

# alias_process_count
# Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
[CheckExternalScripts]
alias_process_count=

alias_mem

Description: Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem

Key: alias_mem

Used by: CheckExternalScripts

Sample:

# alias_mem
# Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
[CheckExternalScripts]
alias_mem=

alias_disk_loose

Description: Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose

Key: alias_disk_loose

Used by: CheckExternalScripts

Sample:

# alias_disk_loose
# Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
[CheckExternalScripts]
alias_disk_loose=

alias_cpu

Description: Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu

Key: alias_cpu

Used by: CheckExternalScripts

Sample:

# alias_cpu
# Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
[CheckExternalScripts]
alias_cpu=

check_ok

Description: Alias for check_ok. To configure this item add a section called: /settings/external scripts/alias/check_ok

Key: check_ok

Used by: CheckExternalScripts

Sample:

# check_ok
# Alias for check_ok. To configure this item add a section called: /settings/external scripts/alias/check_ok
[CheckExternalScripts]
check_ok=

default

Description: Alias for default. To configure this item add a section called: /settings/external scripts/alias/default

Key: default

Used by: CheckExternalScripts

Sample:

# default
# Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
[CheckExternalScripts]
default=

alias_volumes

Description: Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes

Key: alias_volumes

Used by: CheckExternalScripts

Sample:

# alias_volumes
# Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
[CheckExternalScripts]
alias_volumes=

alias_sched_long

Description: Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long

Key: alias_sched_long

Used by: CheckExternalScripts

Sample:

# alias_sched_long
# Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
[CheckExternalScripts]
alias_sched_long=

alias_updates

Description: Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates

Key: alias_updates

Used by: CheckExternalScripts

Sample:

# alias_updates
# Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates
[CheckExternalScripts]
alias_updates=

alias_process

Description: Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process

Key: alias_process

Used by: CheckExternalScripts

Sample:

# alias_process
# Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
[CheckExternalScripts]
alias_process=

No configuration avalible for CheckExternalScripts

Last modified 2 years ago Last modified on 07/08/12 07:08:26

Attachments (2)

Download all attachments as: .zip