]> granicus.if.org Git - icinga2/commitdiff
ITL: Add icingacli command
authorDirk Goetz <dirk.goetz@netways.de>
Mon, 9 Nov 2015 13:26:11 +0000 (14:26 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 12 May 2016 09:08:19 +0000 (11:08 +0200)
Including the subcommand 'businessprocess'.

fixes #10581

doc/7-icinga-template-library.md
itl/plugins-contrib.d/icingacli.conf [new file with mode: 0644]

index 225add6b903e7b444d280d679a0b8800118c58cf..96cdb2a05deefaf3e58bb9f209bcaa3520e0be24 100644 (file)
@@ -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 (file)
index 0000000..38d47a0
--- /dev/null
@@ -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
+}