2015-11-09 14:26:11 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
2018-10-18 09:36:22 +02:00
|
|
|
* Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/) *
|
2015-11-09 14:26:11 +01:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License *
|
|
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
|
|
* of the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the Free Software Foundation *
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
template CheckCommand "icingacli" {
|
|
|
|
command = [ PrefixDir + "/bin/icingacli" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "icingacli-businessprocess" {
|
|
|
|
import "icingacli"
|
|
|
|
|
2016-12-05 13:40:11 +01:00
|
|
|
command += [ "businessprocess", "process", "check" ]
|
2015-11-09 14:26:11 +01:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"--config" = {
|
|
|
|
value = "$icingacli_businessprocess_config$"
|
|
|
|
description = "Configuration file containing your business process without file extension"
|
|
|
|
}
|
|
|
|
"--details" = {
|
|
|
|
set_if = "$icingacli_businessprocess_details$"
|
2016-12-05 13:40:11 +01:00
|
|
|
description = "Get details for root cause analysis"
|
|
|
|
}
|
|
|
|
"--state-type" = {
|
|
|
|
value = "$icingacli_businessprocess_statetype$"
|
|
|
|
description = "Define which state type to look at. Could be either soft or hard, overrides an eventually configured default"
|
2015-11-09 14:26:11 +01:00
|
|
|
}
|
|
|
|
"--process" = {
|
|
|
|
value = "$icingacli_businessprocess_process$"
|
|
|
|
description = "Business process to monitor"
|
|
|
|
skip_key = true
|
|
|
|
required = true
|
2016-12-05 13:40:11 +01:00
|
|
|
order = -1
|
2015-11-09 14:26:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.icingacli_businessprocess_details = false
|
|
|
|
}
|
2016-12-05 13:40:11 +01:00
|
|
|
|
2017-12-29 14:46:19 +01:00
|
|
|
object CheckCommand "icingacli-director" {
|
|
|
|
import "icingacli"
|
|
|
|
|
|
|
|
command += [ "director", "health", "check" ]
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"--check" = {
|
|
|
|
value = "$icingacli_director_check$"
|
|
|
|
description = "Run only a specific test suite"
|
|
|
|
}
|
|
|
|
"--db" = {
|
|
|
|
value = "$icingacli_director_db$"
|
|
|
|
description = "Use a specific Icinga Web DB resource"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|