CheckHelpers
Various helper function to extend other checks.

CheckHelpers — CheckHelpers

Various helper function to extend other checks.

Queries (Overview):

A list of all avalible queries (check commands)

Command Description
check_always_critical Run another check and regardless of its return code return CRITICAL.
check_always_ok Run another check and regardless of its return code return OK.
check_always_warning Run another check and regardless of its return code return WARNING.
check_critical Just return CRITICAL (anything passed along will be used as a message).
check_multi Run more then one check and return the worst state.
check_negate Run a check and alter the return status codes according to arguments.
check_ok Just return OK (anything passed along will be used as a message).
check_timeout Run a check and timeout after a given amount of time if the check has not returned.
check_version Just return the NSClient++ version.
check_warning Just return WARNING (anything passed along will be used as a message).
filter_perf Run a check and filter performance data.

Aliases:

A list of all short hand aliases for queries (check commands)

Alias Command Description
checkalwayscritical check_always_critical CheckAlwaysCRITICAL
checkalwaysok check_always_ok CheckAlwaysOK
checkalwayswarning check_always_warning CheckAlwaysWARNING
checkcritical check_critical CheckCRITICAL
checkmultiple check_multi CheckMultiple
checkok check_ok CheckOK
checkversion check_version CheckVersion
checkwarning check_warning CheckWARNING
negate check_negate negate
timeout check_timeout timeout

Commands (executable): TODO: Add command list

Queries

A quick reference for all avalible queries (check commands) in the CheckHelpers module.

check_always_warning

CheckHelperscheck_always_warning
Run another check and regardless of its return code return WARNING.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).

Arguments

help (CheckHelpers, check_always_warning)
Show help screen (this screen)
help-csv (CheckHelpers, check_always_warning)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_always_warning)
Show help screen (short format).

check_always_critical

CheckHelperscheck_always_critical
Run another check and regardless of its return code return CRITICAL.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).

Arguments

help (CheckHelpers, check_always_critical)
Show help screen (this screen)
help-csv (CheckHelpers, check_always_critical)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_always_critical)
Show help screen (short format).

check_always_ok

CheckHelperscheck_always_ok
Run another check and regardless of its return code return OK.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).

Arguments

help (CheckHelpers, check_always_ok)
Show help screen (this screen)
help-csv (CheckHelpers, check_always_ok)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_always_ok)
Show help screen (short format).

check_negate

CheckHelperscheck_negate
Run a check and alter the return status codes according to arguments.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).
ok N/A The state to return instead of OK
warning N/A The state to return instead of WARNING
critical N/A The state to return instead of CRITICAL
unknown N/A The state to return instead of UNKNOWN
command N/A Wrapped command to execute
arguments N/A List of arguments (for wrapped command)

Arguments

help (CheckHelpers, check_negate)
Show help screen (this screen)
help-csv (CheckHelpers, check_negate)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_negate)
Show help screen (short format).
ok (CheckHelpers, check_negate)
The state to return instead of OK
warning (CheckHelpers, check_negate)
The state to return instead of WARNING
critical (CheckHelpers, check_negate)
The state to return instead of CRITICAL
unknown (CheckHelpers, check_negate)
The state to return instead of UNKNOWN
command (CheckHelpers, check_negate)
Wrapped command to execute
arguments (CheckHelpers, check_negate)
List of arguments (for wrapped command)

check_ok

CheckHelperscheck_ok
Just return OK (anything passed along will be used as a message).

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).

Arguments

help (CheckHelpers, check_ok)
Show help screen (this screen)
help-csv (CheckHelpers, check_ok)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_ok)
Show help screen (short format).

check_timeout

CheckHelperscheck_timeout
Run a check and timeout after a given amount of time if the check has not returned.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).
timeout N/A The timeout value
command N/A Wrapped command to execute
arguments N/A List of arguments (for wrapped command)
return N/A The return status

Arguments

help (CheckHelpers, check_timeout)
Show help screen (this screen)
help-csv (CheckHelpers, check_timeout)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_timeout)
Show help screen (short format).
timeout (CheckHelpers, check_timeout)
The timeout value
command (CheckHelpers, check_timeout)
Wrapped command to execute
arguments (CheckHelpers, check_timeout)
List of arguments (for wrapped command)
return (CheckHelpers, check_timeout)
The return status

filter_perf

CheckHelpersfilter_perf
Run a check and filter performance data.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).
sort none The sort order to use: none, normal or reversed
limit 0 The maximum number of items to return (0 returns all items)
command N/A Wrapped command to execute
arguments N/A List of arguments (for wrapped command)

Arguments

help (CheckHelpers, filter_perf)
Show help screen (this screen)
help-csv (CheckHelpers, filter_perf)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, filter_perf)
Show help screen (short format).
sort (CheckHelpers, filter_perf)
The sort order to use: none, normal or reversed
limit (CheckHelpers, filter_perf)
The maximum number of items to return (0 returns all items)
command (CheckHelpers, filter_perf)
Wrapped command to execute
arguments (CheckHelpers, filter_perf)
List of arguments (for wrapped command)

check_multi

CheckHelperscheck_multi
Run more then one check and return the worst state.

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).
command N/A Commands to run (can be used multiple times)
arguments N/A Deprecated alias for command
separator , Separator between messages
prefix N/A Message prefix
suffix N/A Message suffix

Arguments

help (CheckHelpers, check_multi)
Show help screen (this screen)
help-csv (CheckHelpers, check_multi)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_multi)
Show help screen (short format).
command (CheckHelpers, check_multi)
Commands to run (can be used multiple times)
arguments (CheckHelpers, check_multi)
Deprecated alias for command
separator (CheckHelpers, check_multi)
Separator between messages
prefix (CheckHelpers, check_multi)
Message prefix
suffix (CheckHelpers, check_multi)
Message suffix

check_critical

CheckHelperscheck_critical
Just return CRITICAL (anything passed along will be used as a message).

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).

Arguments

help (CheckHelpers, check_critical)
Show help screen (this screen)
help-csv (CheckHelpers, check_critical)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_critical)
Show help screen (short format).

check_warning

CheckHelperscheck_warning
Just return WARNING (anything passed along will be used as a message).

Usage:

Option Default value Description
help N/A Show help screen (this screen)
help-csv N/A Show help screen as a comma separated list.
help-short N/A Show help screen (short format).

Arguments

help (CheckHelpers, check_warning)
Show help screen (this screen)
help-csv (CheckHelpers, check_warning)
Show help screen as a comma separated list.
This is useful for parsing the output in scripts and generate documentation etc
help-short (CheckHelpers, check_warning)
Show help screen (short format).

check_version

CheckHelperscheck_version
Just return the NSClient++ version.

Usage:

comments powered by Disqus