Various helper function to extend other checks.
A list of all available 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_and_forward | Run a check and forward the result as a passive check. |
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. |
render_perf | Run a check and render the performance data as output message. |
xform_perf | Run a check and transform the performance data in various (currently one) way. |
A list of all short hand aliases for queries (check commands)
Command | Description |
---|---|
checkalwayscritical | Alias for: :query:check_always_critical |
checkalwaysok | Alias for: :query:check_always_ok |
checkalwayswarning | Alias for: :query:check_always_warning |
checkcritical | Alias for: :query:check_critical |
checkmultiple | Alias for: :query:check_multi |
checkok | Alias for: :query:check_ok |
checkversion | Alias for: :query:check_version |
checkwarning | Alias for: :query:check_warning |
negate | Alias for: :query:check_negate |
timeout | Alias for: :query:check_timeout |
A quick reference for all available queries (check commands) in the CheckHelpers module.
Run another check and regardless of its return code return CRITICAL.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
Run another check and regardless of its return code return OK.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
Run another check and regardless of its return code return WARNING.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
Run a check and forward the result as a passive check.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
target | Commands to run (can be used multiple times) | |
command | Commands to run (can be used multiple times) | |
arguments | List of arguments (for wrapped command) |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### targetDescription: Commands to run (can be used multiple times)
### commandDescription: Commands to run (can be used multiple times)
### argumentsDescription: List of arguments (for wrapped command)
Just return CRITICAL (anything passed along will be used as a message).
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
message | No message | Message to return |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### messageDeafult Value: No message
Description: Message to return
Run more then one check and return the worst state.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
command | Commands to run (can be used multiple times) | |
arguments | Deprecated alias for command | |
separator | , | Separator between messages |
prefix | Message prefix | |
suffix | Message suffix |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### commandDescription: Commands to run (can be used multiple times)
### argumentsDescription: Deprecated alias for command
### separatorDeafult Value: ,
Description: Separator between messages
### prefixDescription: Message prefix
### suffixDescription: Message suffix
Run a check and alter the return status codes according to arguments.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
ok | The state to return instead of OK | |
warning | The state to return instead of WARNING | |
critical | The state to return instead of CRITICAL | |
unknown | The state to return instead of UNKNOWN | |
command | Wrapped command to execute | |
arguments | List of arguments (for wrapped command) |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### okDescription: The state to return instead of OK
### warningDescription: The state to return instead of WARNING
### criticalDescription: The state to return instead of CRITICAL
### unknownDescription: The state to return instead of UNKNOWN
### commandDescription: Wrapped command to execute
### argumentsDescription: List of arguments (for wrapped command)
Just return OK (anything passed along will be used as a message).
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
message | No message | Message to return |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### messageDeafult Value: No message
Description: Message to return
Run a check and timeout after a given amount of time if the check has not returned.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
timeout | The timeout value | |
command | Wrapped command to execute | |
arguments | List of arguments (for wrapped command) | |
return | The return status |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### timeoutDescription: The timeout value
### commandDescription: Wrapped command to execute
### argumentsDescription: List of arguments (for wrapped command)
### returnDescription: The return status
Just return the NSClient++ version.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
Just return WARNING (anything passed along will be used as a message).
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
message | No message | Message to return |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### messageDeafult Value: No message
Description: Message to return
Run a check and filter performance data.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
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 | Wrapped command to execute | |
arguments | List of arguments (for wrapped command) |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### sortDeafult Value: none
Description: The sort order to use: none, normal or reversed
### limitDeafult Value: 0
Description: The maximum number of items to return (0 returns all items)
### commandDescription: Wrapped command to execute
### argumentsDescription: List of arguments (for wrapped command)
Run a check and render the performance data as output message.
Option | Default Value | Description |
---|---|---|
filter | Filter which marks interesting items. | |
warning | Filter which marks items which generates a warning state. | |
warn | Short alias for warning | |
critical | Filter which marks items which generates a critical state. | |
crit | Short alias for critical. | |
ok | Filter which marks items which generates an ok state. | |
debug | N/A | Show debugging information in the log |
show-all | N/A | Show details for all matches regardless of status (normally details are only showed for warnings and criticals). |
empty-state | unknown | Return status to use when nothing matched filter. |
perf-config | Performance data generation configuration | |
escape-html | N/A | Escape any < and > characters to prevent HTML encoding |
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
top-syntax | %(status): %(message) %(list) | Top level syntax. |
ok-syntax | ok syntax. | |
empty-syntax | Empty syntax. | |
detail-syntax | %(key) %(value) %(unit) %(warn) %(crit) %(min) %(max) | |
Detail level syntax. | ||
perf-syntax | %(key) | Performance alias syntax. |
command | Wrapped command to execute | |
arguments | List of arguments (for wrapped command) | |
remove-perf | N/A | List of arguments (for wrapped command) |
Description: Filter which marks interesting items. Interesting items are items which will be included in the check. They do not denote warning or critical state instead it defines which items are relevant and you can remove unwanted items. Available options :
Key | Value |
---|---|
count | Number of items matching the filter. Common option for all checks. |
total | Total number of items. Common option for all checks. |
ok_count | Number of items matched the ok criteria. Common option for all checks. |
warn_count | Number of items matched the warning criteria. Common option for all checks. |
crit_count | Number of items matched the critical criteria. Common option for all checks. |
problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
list | A list of all items which matched the filter. Common option for all checks. |
ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
crit | Major version number |
key | Major version number |
max | Major version number |
message | Major version number |
min | Major version number |
unit | Major version number |
value | Major version number |
warn | Major version number |
Description: Filter which marks items which generates a warning state. If anything matches this filter the return status will be escalated to warning. Available options :
Key | Value |
---|---|
count | Number of items matching the filter. Common option for all checks. |
total | Total number of items. Common option for all checks. |
ok_count | Number of items matched the ok criteria. Common option for all checks. |
warn_count | Number of items matched the warning criteria. Common option for all checks. |
crit_count | Number of items matched the critical criteria. Common option for all checks. |
problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
list | A list of all items which matched the filter. Common option for all checks. |
ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
crit | Major version number |
key | Major version number |
max | Major version number |
message | Major version number |
min | Major version number |
unit | Major version number |
value | Major version number |
warn | Major version number |
Description: Short alias for warning
### criticalDescription: Filter which marks items which generates a critical state. If anything matches this filter the return status will be escalated to critical. Available options :
Key | Value |
---|---|
count | Number of items matching the filter. Common option for all checks. |
total | Total number of items. Common option for all checks. |
ok_count | Number of items matched the ok criteria. Common option for all checks. |
warn_count | Number of items matched the warning criteria. Common option for all checks. |
crit_count | Number of items matched the critical criteria. Common option for all checks. |
problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
list | A list of all items which matched the filter. Common option for all checks. |
ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
crit | Major version number |
key | Major version number |
max | Major version number |
message | Major version number |
min | Major version number |
unit | Major version number |
value | Major version number |
warn | Major version number |
Description: Short alias for critical.
### okDescription: Filter which marks items which generates an ok state. If anything matches this any previous state for this item will be reset to ok. Available options :
Key | Value |
---|---|
count | Number of items matching the filter. Common option for all checks. |
total | Total number of items. Common option for all checks. |
ok_count | Number of items matched the ok criteria. Common option for all checks. |
warn_count | Number of items matched the warning criteria. Common option for all checks. |
crit_count | Number of items matched the critical criteria. Common option for all checks. |
problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
list | A list of all items which matched the filter. Common option for all checks. |
ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
crit | Major version number |
key | Major version number |
max | Major version number |
message | Major version number |
min | Major version number |
unit | Major version number |
value | Major version number |
warn | Major version number |
Description: Show debugging information in the log
### show-allDescription: Show details for all matches regardless of status (normally details are only showed for warnings and criticals).
### empty-stateDeafult Value: unknown
Description: Return status to use when nothing matched filter. If no filter is specified this will never happen unless the file is empty.
### perf-configDescription: Performance data generation configuration TODO: obj ( key: value; key: value) obj (key:valuer;key:value)
### escape-htmlDescription: Escape any < and > characters to prevent HTML encoding
### helpDescription: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### top-syntaxDeafult Value: %(status): %(message) %(list)
Description: Top level syntax. Used to format the message to return can include text as well as special keywords which will include information from the checks. To add a keyword to the message you can use two syntaxes either ${keyword} or %(keyword) (there is no difference between them apart from ${} can be difficult to excpae on linux). The available keywords are:
Key | Value |
---|---|
count | Number of items matching the filter. Common option for all checks. |
total | Total number of items. Common option for all checks. |
ok_count | Number of items matched the ok criteria. Common option for all checks. |
warn_count | Number of items matched the warning criteria. Common option for all checks. |
crit_count | Number of items matched the critical criteria. Common option for all checks. |
problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
list | A list of all items which matched the filter. Common option for all checks. |
ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
Description: ok syntax. DEPRECATED! This is the syntax for when an ok result is returned. This value will not be used if your syntax contains %(list) or %(count).
### empty-syntaxDescription: Empty syntax. DEPRECATED! This is the syntax for when nothing matches the filter. Possible values are:
Key | Value |
---|---|
count | Number of items matching the filter. Common option for all checks. |
total | Total number of items. Common option for all checks. |
ok_count | Number of items matched the ok criteria. Common option for all checks. |
warn_count | Number of items matched the warning criteria. Common option for all checks. |
crit_count | Number of items matched the critical criteria. Common option for all checks. |
problem_count | Number of items matched either warning or critical criteria. Common option for all checks. |
list | A list of all items which matched the filter. Common option for all checks. |
ok_list | A list of all items which matched the ok criteria. Common option for all checks. |
warn_list | A list of all items which matched the warning criteria. Common option for all checks. |
crit_list | A list of all items which matched the critical criteria. Common option for all checks. |
problem_list | A list of all items which matched either the critical or the warning criteria. Common option for all checks. |
detail_list | A special list with critical, then warning and finally ok. Common option for all checks. |
status | The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks. |
Deafult Value: %(key) %(value) %(unit) %(warn) %(crit) %(min) %(max)
Description: Detail level syntax. Used to format each resulting item in the message. %(list) will be replaced with all the items formated by this syntax string in the top-syntax. To add a keyword to the message you can use two syntaxes either ${keyword} or %(keyword) (there is no difference between them apart from ${} can be difficult to excpae on linux). The available keywords are:
Key | Value |
---|---|
crit | Major version number |
key | Major version number |
max | Major version number |
message | Major version number |
min | Major version number |
unit | Major version number |
value | Major version number |
warn | Major version number |
Deafult Value: %(key)
Description: Performance alias syntax. This is the syntax for the base names of the performance data. Possible values are:
Key | Value |
---|---|
crit | Major version number |
key | Major version number |
max | Major version number |
message | Major version number |
min | Major version number |
unit | Major version number |
value | Major version number |
warn | Major version number |
Description: Wrapped command to execute
### argumentsDescription: List of arguments (for wrapped command)
### remove-perfDescription: List of arguments (for wrapped command)
Run a check and transform the performance data in various (currently one) way.
Option | Default Value | Description |
---|---|---|
help | N/A | Show help screen (this screen) |
help-pb | N/A | Show help screen as a protocol buffer payload |
show-default | N/A | Show default values for a given command |
help-short | N/A | Show help screen (short format). |
command | Wrapped command to execute | |
arguments | List of arguments (for wrapped command) | |
mode | Transformation mode: extract to fetch data or minmax to add missing min/max | |
field | Field to work with (value, warn, crit, max, min) | |
replace | Replace expression for the alias |
Description: Show help screen (this screen)
### help-pbDescription: Show help screen as a protocol buffer payload
### show-defaultDescription: Show default values for a given command
### help-shortDescription: Show help screen (short format).
### commandDescription: Wrapped command to execute
### argumentsDescription: List of arguments (for wrapped command)
### modeDescription: Transformation mode: extract to fetch data or minmax to add missing min/max
### fieldDescription: Field to work with (value, warn, crit, max, min)
### replaceDescription: Replace expression for the alias