mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-30 09:04:35 +02:00
New ITL command nscp-local-tasksched
This commit is contained in:
parent
cfd6c79a03
commit
ffc9e13965
@ -293,3 +293,68 @@ object CheckCommand "nscp-local-counter" {
|
|||||||
vars.nscp_counter_less = false
|
vars.nscp_counter_less = false
|
||||||
vars.nscp_counter_perfsyntax = "$nscp_counter_name$"
|
vars.nscp_counter_perfsyntax = "$nscp_counter_name$"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object CheckCommand "nscp-local-tasksched" {
|
||||||
|
import "nscp-local"
|
||||||
|
|
||||||
|
arguments += {
|
||||||
|
"--filter" = {
|
||||||
|
set_if = {{
|
||||||
|
var scheduler_name = macro("$nscp_tasksched_name$")
|
||||||
|
if (len(scheduler_name) > 0 ) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
value = "title='$nscp_tasksched_name$'"
|
||||||
|
description = "Name of the task to check."
|
||||||
|
}
|
||||||
|
"--folder" = {
|
||||||
|
value = "$nscp_tasksched_folder$"
|
||||||
|
description = "The folder in which the tasks to check reside."
|
||||||
|
}
|
||||||
|
"--hidden" = {
|
||||||
|
set_if = "$nscp_tasksched_hidden$"
|
||||||
|
description = "Look for hidden tasks."
|
||||||
|
}
|
||||||
|
"--recursive" = {
|
||||||
|
value = "$nscp_tasksched_recursive$"
|
||||||
|
description = "Recurse sub folder (defaults to true)."
|
||||||
|
}
|
||||||
|
"--warning" = {
|
||||||
|
value = "$nscp_tasksched_warning$"
|
||||||
|
description = "Filter which marks items which generates a warning state."
|
||||||
|
}
|
||||||
|
"--critical" = {
|
||||||
|
value = "$nscp_tasksched_critical$"
|
||||||
|
description = "Filter which marks items which generates a critical state."
|
||||||
|
}
|
||||||
|
"--empty-state" = {
|
||||||
|
value = "$nscp_tasksched_emptystate$"
|
||||||
|
description = "Return status to use when nothing matched filter."
|
||||||
|
}
|
||||||
|
"--perf-syntax" = {
|
||||||
|
value = "$nscp_tasksched_perfsyntax$"
|
||||||
|
description = "Performance alias syntax."
|
||||||
|
}
|
||||||
|
"--detail-syntax" = {
|
||||||
|
value = "$nscp_tasksched_detailsyntax$"
|
||||||
|
description = "Detail level syntax."
|
||||||
|
}
|
||||||
|
"-a" = {
|
||||||
|
value = "$nscp_tasksched_arguments$"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vars.nscp_modules = "CheckTaskSched"
|
||||||
|
vars.nscp_query = "check_tasksched"
|
||||||
|
vars.nscp_showall = "$nscp_tasksched_showall$"
|
||||||
|
vars.nscp_tasksched_recursive = true
|
||||||
|
vars.nscp_tasksched_perfsyntax = "%(title)"
|
||||||
|
vars.nscp_tasksched_detailsyntax = "%(folder)/%(title): %(exit_code) != 0"
|
||||||
|
vars.nscp_tasksched_warning = "exit_code != 0"
|
||||||
|
vars.nscp_tasksched_critical = "exit_code < 0"
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user