From ec40251c4e05be4c0b068f3eb4502170827567f3 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 29 Aug 2013 14:50:27 +0200 Subject: [PATCH] Configuration: Remove 'local' identifier. --- contrib/config/gen_simple_dummy_config | 8 ++++---- contrib/config/mf/icinga2.conf | 18 +++++++++--------- docs/icinga2-tutorial.adoc | 14 +++++++------- etc/icinga2/icinga2.conf.dist | 6 +++--- etc/icinga2/icinga2.conf.win32 | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/contrib/config/gen_simple_dummy_config b/contrib/config/gen_simple_dummy_config index d3d09d064..91f5bcff1 100755 --- a/contrib/config/gen_simple_dummy_config +++ b/contrib/config/gen_simple_dummy_config @@ -11,19 +11,19 @@ cat >> $CONFFILE << EOF include include -local object IcingaApplication "icinga" { +object IcingaApplication "icinga" { macros = { plugindir = "/usr/lib/nagios/plugins" } } library "compat" -local object CompatComponent "compat" { } -local object CompatLog "compat-log" { } +object CompatComponent "compat" { } +object CompatLog "compat-log" { } /* library "livestatus" -local object LivestatusComponent "livestatus" {} +object LivestatusComponent "livestatus" {} */ object CheckCommand "check_dummy" inherits "plugin-check-command" { diff --git a/contrib/config/mf/icinga2.conf b/contrib/config/mf/icinga2.conf index a87686cbb..98aa46708 100644 --- a/contrib/config/mf/icinga2.conf +++ b/contrib/config/mf/icinga2.conf @@ -13,7 +13,7 @@ include /** * Global configuration settings */ -local object IcingaApplication "icinga" { +object IcingaApplication "icinga" { macros = { plugindir = "/usr/lib/nagios/plugins", iconimagedir = "/icinga2/images/icons" @@ -24,11 +24,11 @@ local object IcingaApplication "icinga" { * Enable Syslogger */ /* -local object SyslogLogger "icinga2-syslog" { +object SyslogLogger "icinga2-syslog" { severity = "information" } -local object FileLogger "my-debug-file" { +object FileLogger "my-debug-file" { severity = "debug", path = "/home/michi/i2/var/log/icinga2/icinga2-debug.log" } @@ -39,13 +39,13 @@ local object FileLogger "my-debug-file" { * hosts and services. */ library "compat" -local object CompatComponent "compat" { } -local object CompatLog "compat-log" { } +object CompatComponent "compat" { } +object CompatLog "compat-log" { } /** * INGRAPH */ -local object PerfdataWriter "pnp" { +object PerfdataWriter "pnp" { perfdata_path = "/data/icinga2/perfdata/service-perfdata", format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$", rotation_interval = 15s, @@ -56,13 +56,13 @@ local object PerfdataWriter "pnp" { */ library "livestatus" -local object LivestatusComponent "livestatus-tcp" { +object LivestatusComponent "livestatus-tcp" { socket_type = "tcp", host = "10.0.10.18", port = "6558" } -local object LivestatusComponent "livestatus-unix" { +object LivestatusComponent "livestatus-unix" { socket_type = "unix", socket_path = "/home/michi/i2/var/run/icinga2/livestatus" } @@ -72,7 +72,7 @@ local object LivestatusComponent "livestatus-unix" { */ library "ido_mysql" -local object MysqlDbConnection "ido-mysql" { +object MysqlDbConnection "ido-mysql" { host = "127.0.0.1", port = "3306", user = "icinga", diff --git a/docs/icinga2-tutorial.adoc b/docs/icinga2-tutorial.adoc index 7f3661045..a33ee5d0a 100644 --- a/docs/icinga2-tutorial.adoc +++ b/docs/icinga2-tutorial.adoc @@ -52,7 +52,7 @@ Start by creating the file /etc/icinga2/icinga2.conf with the following content: include include -local object IcingaApplication "my-icinga" { +object IcingaApplication "my-icinga" { macros["plugindir"] = "/usr/lib/nagios/plugins" } ---- @@ -202,8 +202,8 @@ to your configuration file: ---- library "compat" -local object CompatComponent "compat" { } -local object CompatLog "my-log" { } +object CompatComponent "compat" { } +object CompatLog "my-log" { } ---- After restarting Icinga 2 you should be able to find the status.dat and objects.cache files in @@ -660,7 +660,7 @@ or your preferred graphite collector. Let's create a new PNP PerfdataWriter object: ---- -local object PerfdataWriter "pnp" { +object PerfdataWriter "pnp" { perfdata_path = "/var/lib/icinga2/service-perfdata", format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$", rotation_interval = 15s, @@ -687,7 +687,7 @@ Once Icinga 2 is started, configure your gui (e.g. Thruk) using the livestatus b TCP Socket ---- library "livestatus" -local object LivestatusComponent "livestatus-tcp" { +object LivestatusComponent "livestatus-tcp" { socket_type = "tcp", host = "10.0.10.18", port = "6558" @@ -697,7 +697,7 @@ local object LivestatusComponent "livestatus-tcp" { Unix Socket ---- library "livestatus" -local object LivestatusComponent "livestatus-unix" { +object LivestatusComponent "livestatus-unix" { socket_type = "unix", socket_path = "/var/run/icinga2/livestatus" } @@ -726,7 +726,7 @@ Icinga 1.x setup, if existing. ---- library "ido_mysql" -local object IdoMysqlDbConnection "my-ido-mysql" { +object IdoMysqlDbConnection "my-ido-mysql" { host = "127.0.0.1", port = "3306", user = "icinga", diff --git a/etc/icinga2/icinga2.conf.dist b/etc/icinga2/icinga2.conf.dist index f5fb6660c..f4a4afd10 100644 --- a/etc/icinga2/icinga2.conf.dist +++ b/etc/icinga2/icinga2.conf.dist @@ -13,7 +13,7 @@ include /** * Global configuration settings */ -local object IcingaApplication "icinga" { +object IcingaApplication "icinga" { macros = { plugindir = "/usr/local/icinga/libexec" } @@ -25,8 +25,8 @@ local object IcingaApplication "icinga" { * hosts and services. CompatLog writeis the Icinga 1.x icinga.log and archives. */ library "compat" -local object CompatComponent "compat" { } -local object CompatLog "compat-log" { } +object CompatComponent "compat" { } +object CompatLog "compat-log" { } /** * And finally we define some host that should be checked. diff --git a/etc/icinga2/icinga2.conf.win32 b/etc/icinga2/icinga2.conf.win32 index ac9f037b7..ecd9a3ba8 100644 --- a/etc/icinga2/icinga2.conf.win32 +++ b/etc/icinga2/icinga2.conf.win32 @@ -13,7 +13,7 @@ /** * Global configuration settings */ -local object IcingaApplication "icinga" { +object IcingaApplication "icinga" { pid_path = "icinga2.pid", state_path = "icinga2.state", @@ -28,7 +28,7 @@ local object IcingaApplication "icinga" { * hosts and services. */ library "compat" -local object Component "compat" { +object Component "compat" { status_path = "status.dat", objects_path = "objects.cache", }