CheckTaskSched

Check status of your scheduled jobs.

List of commands:

A list of all available queries (check commands)

Command Description
check_tasksched Check status of scheduled jobs.
checktasksched Legacy version of check_tasksched

Queries

A quick reference for all available queries (check commands) in the CheckTaskSched module.

check_tasksched

Check status of scheduled jobs.

Sample Commands

To edit these sample please edit this page

Default check via NRPE::

check_nrpe --host 192.168.56.103 --command check_tasksched
/test: 1 != 0|'test'=1;0;0

Command-line Arguments

Option Default Value Description
filter enabled = 1 Filter which marks interesting items.
warning exit_code != 0 Filter which marks items which generates a warning state.
warn Short alias for warning
critical exit_code < 0 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 warning 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}: ${problem_list} Top level syntax.
ok-syntax %(status): All tasks are ok ok syntax.
empty-syntax %(status): No tasks found Empty syntax.
detail-syntax ${folder}/${title}: ${exit_code} != 0 Detail level syntax.
perf-syntax ${title} Performance alias syntax.
force-old N/A The name of the computer that you want to connect to.
computer The name of the computer that you want to connect to.
user The user name that is used during the connection to the computer.
domain The domain of the user specified in the user parameter.
password The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used.
folder The folder in which the tasks to check reside.
recursive Recurse sub folder (defaults to true).

filter:

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.

Deafult Value: | enabled = 1

warning:

Filter which marks items which generates a warning state. If anything matches this filter the return status will be escalated to warning.

Deafult Value: | exit_code != 0

critical:

Filter which marks items which generates a critical state. If anything matches this filter the return status will be escalated to critical.

Deafult Value: | exit_code < 0

ok:

Filter which marks items which generates an ok state. If anything matches this any previous state for this item will be reset to ok.

empty-state:

Return status to use when nothing matched filter. If no filter is specified this will never happen unless the file is empty.

Deafult Value: | warning

perf-config:

Performance data generation configuration TODO: obj ( key: value; key: value) obj (key:valuer;key:value)

top-syntax:

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).

Deafult Value: | ${status}: ${problem_list}

ok-syntax:

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).

Deafult Value: | %(status): All tasks are ok

empty-syntax:

Empty syntax. DEPRECATED! This is the syntax for when nothing matches the filter.

Deafult Value: | %(status): No tasks found

detail-syntax:

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).

Deafult Value: | ${folder}/${title}: ${exit_code} != 0

perf-syntax:

Performance alias syntax. This is the syntax for the base names of the performance data.

Deafult Value: | ${title}

Filter keywords

Option Description
application Retrieves the name of the application that the task is associated with.
comment Retrieves the comment or description for the work item.
count Number of items matching the filter. Common option for all checks.
creator Retrieves the creator of the work item.
crit_count Number of items matched the critical criteria. Common option for all checks.
crit_list A list of all items which matched the critical criteria. Common option for all checks.
detail_list A special list with critical, then warning and finally ok. Common option for all checks.
enabled TODO.
exit_code Retrieves the work item’s last exit code.
folder The task folder
has_run True if the task has ever executed.
list A list of all items which matched the filter. Common option for all checks.
max_run_time Retrieves the maximum length of time the task can run.
most_recent_run_time Retrieves the most recent time the work item began running.
ok_count Number of items matched the ok criteria. Common option for all checks.
ok_list A list of all items which matched the ok criteria. Common option for all checks.
parameters Retrieves the command-line parameters of a task.
priority Retrieves the priority for the task.
problem_count Number of items matched either warning or 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.
status The returned status (OK/WARN/CRIT/UNKNOWN). Common option for all checks.
task_status Retrieves the status of the work item.
title The task title
total Total number of items. Common option for all checks.
warn_count Number of items matched the warning criteria. Common option for all checks.
warn_list A list of all items which matched the warning criteria. Common option for all checks.
working_directory Retrieves the working directory of the task.

checktasksched

Legacy version of check_tasksched

Command-line 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).
warn Warning bounds.
crit Critical bounds.
MaxWarn Maximum value before a warning is returned.
MaxCrit Maximum value before a critical is returned.
MinWarn Minimum value before a warning is returned.
MinCrit Minimum value before a critical is returned.
Counter The time to check
truncate Deprecated option
syntax Syntax (same as detail-syntax in the check_tasksched check)
master-syntax Master Syntax (same as top-syntax in the check_tasksched check)
filter Filter (same as filter in the check_tasksched check)
debug N/A Filter (same as filter in the check_tasksched check)