[icinga-checkins] icinga.org: icinga2/support/2.4: ITL: Add icingacli command

git at icinga.org git at icinga.org
Thu May 12 11:50:26 CEST 2016


Module: icinga2
Branch: support/2.4
Commit: 0df7327947cc6c1651af13794f07590428d8e0ce
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=0df7327947cc6c1651af13794f07590428d8e0ce

Author: Dirk Goetz <dirk.goetz at netways.de>
Date:   Mon Nov  9 14:26:11 2015 +0100

ITL: Add icingacli command

Including the subcommand 'businessprocess'.

fixes #10581

---

 doc/7-icinga-template-library.md     |   17 ++++++++++++
 itl/plugins-contrib.d/icingacli.conf |   49 ++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md
index 225add6..96cdb2a 100644
--- a/doc/7-icinga-template-library.md
+++ b/doc/7-icinga-template-library.md
@@ -1844,6 +1844,23 @@ hpasm_servertype		| **Optional.** The type of the server: proliant (default) or
 hpasm_eval-nics			| **Optional.** Check network interfaces (and groups). Try it and report me whyt you think about it. I need to build up some know how on this subject. If get an error and you think, it is not justified for your configuration, please tell me about it. (alwasy send the output of "snmpwalk -On .... 1.3.6.1.4.1.232" and a description how you setup your nics and why it is correct opposed to the plugins error message.
 
 
+### <a id="plugins-contrib-icingacli"></a> IcingaCLI
+
+This category includes all plugins using the icingacli provided by Icinga Web 2.
+
+#### <a id="plugins-contrib-icingacli-businessprocess"></a> Business Process
+
+This subcommand is provided by the [business process module](https://exchange.icinga.org/icinga/Business+Process) and executed as `icingacli-businessprocess`. The module is hosted by the Icinga project on its [project homepage](https://dev.icinga.org/projects/icingaweb2-module-businessprocess).
+
+Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
+
+Name                    	          | Description
+------------------------------------------|-----------------------------------------------------------------------------------------
+icingacli_businessprocess_process         | **Required.** Business process to monitor.
+icingacli_businessprocess_config          | **Optional.** Configuration file containing your business process without file extension.
+icingacli_businessprocess_details         | **Optional.** Get details for root cause analyses. Defaults to false.
+
+
 ### <a id="plugins-contrib-ipmi"></a> IPMI Devices
 
 This category includes all plugins for IPMI devices.
diff --git a/itl/plugins-contrib.d/icingacli.conf b/itl/plugins-contrib.d/icingacli.conf
new file mode 100644
index 0000000..38d47a0
--- /dev/null
+++ b/itl/plugins-contrib.d/icingacli.conf
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * Icinga 2                                                                   *
+ * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org)   *
+ *                                                                            *
+ * 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" {
+	import "plugin-check-command"
+
+	command = [ PrefixDir + "/bin/icingacli" ]
+}
+
+object CheckCommand "icingacli-businessprocess" {
+	import "icingacli"
+
+	command += [ "businessprocess", "check", "process" ]
+
+	arguments = {
+		"--config" = {
+			value = "$icingacli_businessprocess_config$"
+			description = "Configuration file containing your business process without file extension"
+		}
+		"--details" = {
+			set_if = "$icingacli_businessprocess_details$"
+			description = "Get details for root cause analyses"
+		}
+		"--process" = {
+			value = "$icingacli_businessprocess_process$"
+			description = "Business process to monitor"
+			skip_key = true
+			required = true
+		}
+	}
+
+	vars.icingacli_businessprocess_details = false
+}



More information about the icinga-checkins mailing list