From 0e8edfa2c79956a3a3068c5dbc3cb39e34fb2cfe Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gunnar.beutner@netways.de>
Date: Sun, 28 Aug 2016 10:11:28 +0200
Subject: [PATCH] Fix code style violations in the ITL

fixes #12573
---
 itl/command-nscp-local.conf                 |   1 -
 itl/plugins-contrib.d/metrics.conf          |  19 ++
 itl/plugins-contrib.d/network-services.conf |  19 ++
 itl/plugins-contrib.d/operating-system.conf |   2 +
 itl/plugins-contrib.d/web.conf              | 290 ++++++++++----------
 itl/windows-plugins                         |   2 +-
 6 files changed, 186 insertions(+), 147 deletions(-)

diff --git a/itl/command-nscp-local.conf b/itl/command-nscp-local.conf
index ee157fd56f3..f38f1830f6f 100644
--- a/itl/command-nscp-local.conf
+++ b/itl/command-nscp-local.conf
@@ -21,7 +21,6 @@ if (!globals.contains("NscpPath")) {
 	NscpPath = dirname(msi_get_component_path("{5C45463A-4AE9-4325-96DB-6E239C034F93}"))
 }
 
-
 object CheckCommand "nscp-local" {
 	import  "plugin-check-command"
 
diff --git a/itl/plugins-contrib.d/metrics.conf b/itl/plugins-contrib.d/metrics.conf
index f7734de1926..acfbf2f0ef2 100644
--- a/itl/plugins-contrib.d/metrics.conf
+++ b/itl/plugins-contrib.d/metrics.conf
@@ -1,3 +1,22 @@
+/******************************************************************************
+ * 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.             *
+ ******************************************************************************/
+
 object CheckCommand "graphite" {
 	import "plugin-check-command"
 
diff --git a/itl/plugins-contrib.d/network-services.conf b/itl/plugins-contrib.d/network-services.conf
index 056bf523a4b..00cdf0984c2 100644
--- a/itl/plugins-contrib.d/network-services.conf
+++ b/itl/plugins-contrib.d/network-services.conf
@@ -1,3 +1,22 @@
+/******************************************************************************
+ * 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.             *
+ ******************************************************************************/
+
 object CheckCommand "kdc" {
 	import "plugin-check-command"
 	import "ipv4-or-ipv6"
diff --git a/itl/plugins-contrib.d/operating-system.conf b/itl/plugins-contrib.d/operating-system.conf
index a209b54a2f9..5d47f5cba6f 100644
--- a/itl/plugins-contrib.d/operating-system.conf
+++ b/itl/plugins-contrib.d/operating-system.conf
@@ -129,7 +129,9 @@ object CheckCommand "yum" {
 
 object CheckCommand "iostat" {
 	import "plugin-check-command"
+
 	command = [ PluginContribDir + "/check_iostat" ]
+
 	arguments = {
 		"-d" = {
 			value = "$iostat_disk$"
diff --git a/itl/plugins-contrib.d/web.conf b/itl/plugins-contrib.d/web.conf
index 176d21005fc..9e2a785eff7 100644
--- a/itl/plugins-contrib.d/web.conf
+++ b/itl/plugins-contrib.d/web.conf
@@ -63,155 +63,155 @@ object CheckCommand "webinject" {
 }
 
 object CheckCommand "jmx4perl" {
-		import "plugin-check-command"
+	import "plugin-check-command"
 
-		command = [ PluginContribDir + "/check_jmx4perl" ]
+	command = [ PluginContribDir + "/check_jmx4perl" ]
 
-		arguments = {
-				"-u" = {
-						value = "$jmx4perl_url$"
-						description = "URL to agent web application (e.g. http://server:8080/jolokia/)"
-				}
-				"--product" = {
-						value = "$jmx4perl_product$"
-						description = "Name of app server product (e.g. jboss)"
-				}
-				"--alias" = {
-						value = "$jmx4perl_alias$"
-						description = "Alias name for attribute (e.g. MEMORY_HEAP_USED)"
-				}
-				"-m" = {
-						value = "$jmx4perl_mbean$"
-						description = "MBean name (e.g. java.lang:type=Memory)"
-				}
-				"-a" = {
-						value = "$jmx4perl_attribute$"
-						description = "Attribute name (e.g. HeapMemoryUsage)"
-				}
-				"-o" = {
-						value = "$jmx4perl_operation$"
-						description = "Operation to execute"
-				}
-				"--value" = {
-						value = "$jmx4perl_value$"
-						description = "Shortcut for specifying mbean/attribute/path. Slashes within names must be escaped with backslash"
-				}
-				"--delta" = {
-						value = "$jmx4perl_delta$"
-						description = "Switches on incremental mode. Optional argument are seconds used for normalizing."
-				}
-				"-p" = {
-						value = "$jmx4perl_path$"
-						description = "Inner path for extracting a single value from a complex attribute or return value (e.g. used)"
-				}
-				"--target" = {
-						value = "$jmx4perl_target$"
-						description = "JSR-160 Service URL specifing the target server"
-				}
-				"--target-user" = {
-						value = "$jmx4perl_target_user$"
-						description = "Username to use for JSR-160 connection"
-				}
-				"--target-password" = {
-						value = "$jmx4perl_target_password$"
-						description = "Password to use for JSR-160 connection"
-				}
-				"--proxy" = {
-						value = "$jmx4perl_proxy$"
-						description = "Proxy to use"
-				}
-				"--user" = {
-						value = "$jmx4perl_user$"
-						description = "User for HTTP authentication"
-				}
-				"--password" = {
-						value = "$jmx4perl_password$"
-						description = "Password for HTTP authentication"
-				}
-				"-n" = {
-						value = "$jmx4perl_name$"
-						description = "Name to use for output. Optional, by default a standard value based on the MBean and attribute will be used"
-				}
-				"--method" = {
-						value = "$jmx4perl_method$"
-						description = "HTTP method to use. Either get or post"
-				}
-				"-b" = {
-						value = "$jmx4perl_base$"
-						description = "Base name, which when given, interprets critical and warning values as relative in the range 0 .. 100%. Must be given in the form mbean/attribute/path"
-				}
-				"--base-mbean" = {
-						value = "$jmx4perl_base_mbean$"
-						description = "Base MBean name, interprets critical and warning values as relative in the range 0 .. 100%. Requires a base-attribute, too"
-				}
-				"--base-attribute" = {
-						value = "$jmx4perl_base_attribute$"
-						description = "Base attribute for a relative check. Used together with base-mbean"
-				}
-				"--base-path" = {
-						value = "$jmx4perl_base_path$"
-						description = "Base path for relative checks, where this path is used on the base attribute's value"
-				}
-				"--unit" = {
-						value = "$jmx4perl_unit$"
-						description = "Unit of measurement of the data retreived. Recognized values are [B|KB|MN|GB|TB] for memory values and [us|ms|s|m|h|d] for time values"
-				}
-				"--null" = {
-						value = "$jmx4perl_null$"
-						description = "Value which should be used in case of a null return value of an operation or attribute. Is null by default"
-				}
-				"--string" = {
-						set_if = "$jmx4perl_string$"
-						description = "Force string comparison for critical and warning checks"
-				}
-				"--numeric" = {
-						set_if = "$jmx4perl_numeric$"
-						description = "Force numeric comparison for critical and warning checks"
-				}
-				"-c" = {
-						value = "$jmx4perl_critical$"
-						description = "Critical threshold for value"
-				}
-				"-w" = {
-						value = "$jmx4perl_warning$"
-						description = "Warning threshold for value"
-				}
-				"-l" = {
-						value = "$jmx4perl_label$"
-						description = "Label to be used for printing out the result of the check. Placeholders can be used."
-				}
-				"--perfdata" = {
-						value = "$jmx4perl_perfdata$"
-						description = "Whether performance data should be omitted, which are included by default."
-				}
-				"--unknown-is-critical" = {
-						set_if = "$jmx4perl_unknown_is_critical$"
-						description = "Map UNKNOWN errors to errors with a CRITICAL status"
-				}
-				"-t" = {
-						value = "$jmx4perl_timeout$"
-						description = "Seconds before plugin times out (default: 15)"
-				}
-				"--config" = {
-						value = "$jmx4perl_config$"
-						description = "Path to configuration file."
-				}
-				"--server" = {
-						value = "$jmx4perl_server$"
-						description = "Symbolic name of server url to use, which needs to be configured in the configuration file."
-				}
-				"--check" = {
-						value = "$jmx4perl_check$"
-						description = "Name of a check configuration as defined in the configuration file, use array if you need arguments."
-						order = 1
-						repeat_key = false
-				}
+	arguments = {
+		"-u" = {
+			value = "$jmx4perl_url$"
+			description = "URL to agent web application (e.g. http://server:8080/jolokia/)"
+		}
+		"--product" = {
+			value = "$jmx4perl_product$"
+			description = "Name of app server product (e.g. jboss)"
+		}
+		"--alias" = {
+			value = "$jmx4perl_alias$"
+			description = "Alias name for attribute (e.g. MEMORY_HEAP_USED)"
 		}
+		"-m" = {
+			value = "$jmx4perl_mbean$"
+			description = "MBean name (e.g. java.lang:type=Memory)"
+		}
+		"-a" = {
+			value = "$jmx4perl_attribute$"
+			description = "Attribute name (e.g. HeapMemoryUsage)"
+		}
+		"-o" = {
+			value = "$jmx4perl_operation$"
+			description = "Operation to execute"
+		}
+		"--value" = {
+			value = "$jmx4perl_value$"
+			description = "Shortcut for specifying mbean/attribute/path. Slashes within names must be escaped with backslash"
+		}
+		"--delta" = {
+			value = "$jmx4perl_delta$"
+			description = "Switches on incremental mode. Optional argument are seconds used for normalizing."
+		}
+		"-p" = {
+			value = "$jmx4perl_path$"
+			description = "Inner path for extracting a single value from a complex attribute or return value (e.g. used)"
+		}
+		"--target" = {
+			value = "$jmx4perl_target$"
+			description = "JSR-160 Service URL specifing the target server"
+		}
+		"--target-user" = {
+			value = "$jmx4perl_target_user$"
+			description = "Username to use for JSR-160 connection"
+		}
+		"--target-password" = {
+			value = "$jmx4perl_target_password$"
+			description = "Password to use for JSR-160 connection"
+		}
+		"--proxy" = {
+			value = "$jmx4perl_proxy$"
+			description = "Proxy to use"
+		}
+		"--user" = {
+			value = "$jmx4perl_user$"
+			description = "User for HTTP authentication"
+		}
+		"--password" = {
+			value = "$jmx4perl_password$"
+			description = "Password for HTTP authentication"
+		}
+		"-n" = {
+			value = "$jmx4perl_name$"
+			description = "Name to use for output. Optional, by default a standard value based on the MBean and attribute will be used"
+		}
+		"--method" = {
+			value = "$jmx4perl_method$"
+			description = "HTTP method to use. Either get or post"
+		}
+		"-b" = {
+			value = "$jmx4perl_base$"
+			description = "Base name, which when given, interprets critical and warning values as relative in the range 0 .. 100%. Must be given in the form mbean/attribute/path"
+		}
+		"--base-mbean" = {
+			value = "$jmx4perl_base_mbean$"
+			description = "Base MBean name, interprets critical and warning values as relative in the range 0 .. 100%. Requires a base-attribute, too"
+		}
+		"--base-attribute" = {
+			value = "$jmx4perl_base_attribute$"
+			description = "Base attribute for a relative check. Used together with base-mbean"
+		}
+		"--base-path" = {
+			value = "$jmx4perl_base_path$"
+			description = "Base path for relative checks, where this path is used on the base attribute's value"
+		}
+		"--unit" = {
+			value = "$jmx4perl_unit$"
+			description = "Unit of measurement of the data retreived. Recognized values are [B|KB|MN|GB|TB] for memory values and [us|ms|s|m|h|d] for time values"
+		}
+		"--null" = {
+			value = "$jmx4perl_null$"
+			description = "Value which should be used in case of a null return value of an operation or attribute. Is null by default"
+		}
+		"--string" = {
+			set_if = "$jmx4perl_string$"
+			description = "Force string comparison for critical and warning checks"
+		}
+		"--numeric" = {
+			set_if = "$jmx4perl_numeric$"
+			description = "Force numeric comparison for critical and warning checks"
+		}
+		"-c" = {
+			value = "$jmx4perl_critical$"
+			description = "Critical threshold for value"
+		}
+		"-w" = {
+			value = "$jmx4perl_warning$"
+			description = "Warning threshold for value"
+		}
+		"-l" = {
+			value = "$jmx4perl_label$"
+			description = "Label to be used for printing out the result of the check. Placeholders can be used."
+		}
+		"--perfdata" = {
+			value = "$jmx4perl_perfdata$"
+			description = "Whether performance data should be omitted, which are included by default."
+		}
+		"--unknown-is-critical" = {
+			set_if = "$jmx4perl_unknown_is_critical$"
+			description = "Map UNKNOWN errors to errors with a CRITICAL status"
+		}
+		"-t" = {
+			value = "$jmx4perl_timeout$"
+			description = "Seconds before plugin times out (default: 15)"
+		}
+		"--config" = {
+			value = "$jmx4perl_config$"
+			description = "Path to configuration file."
+		}
+		"--server" = {
+			value = "$jmx4perl_server$"
+			description = "Symbolic name of server url to use, which needs to be configured in the configuration file."
+		}
+		"--check" = {
+			value = "$jmx4perl_check$"
+			description = "Name of a check configuration as defined in the configuration file, use array if you need arguments."
+			order = 1
+			repeat_key = false
+		}
+	}
 
-		vars.jmx4perl_url = "http://$address$:8080/jolokia"
-		vars.jmx4perl_string = false
-		vars.jmx4perl_numeric = false
-		vars.jmx4perl_unknown_is_critical = false
+	vars.jmx4perl_url = "http://$address$:8080/jolokia"
+	vars.jmx4perl_string = false
+	vars.jmx4perl_numeric = false
+	vars.jmx4perl_unknown_is_critical = false
 }
 
 object CheckCommand "squid" {
diff --git a/itl/windows-plugins b/itl/windows-plugins
index 92e9e780244..bd7cfda2a30 100644
--- a/itl/windows-plugins
+++ b/itl/windows-plugins
@@ -17,4 +17,4 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
  
- include "command-plugins-windows.conf"
+include "command-plugins-windows.conf"