From: mhoellein Date: Fri, 26 May 2023 09:58:36 +0000 (+0200) Subject: daily autocommit X-Git-Url: https://git.hoellein.online/?a=commitdiff_plain;h=13ad153d0cadbcfbc3779092a8cdab8de74bf09e;p=vserver2 daily autocommit --- diff --git a/.etckeeper b/.etckeeper index a4970c6..267831f 100755 --- a/.etckeeper +++ b/.etckeeper @@ -996,13 +996,19 @@ maybe chgrp 'nagios' 'icinga2/conf.d/users.conf' maybe chmod 0644 'icinga2/conf.d/users.conf' maybe chown 'nagios' 'icinga2/constants.conf' maybe chgrp 'nagios' 'icinga2/constants.conf' -maybe chmod 0640 'icinga2/constants.conf' +maybe chmod 0644 'icinga2/constants.conf' +maybe chown 'nagios' 'icinga2/constants.conf.orig' +maybe chgrp 'nagios' 'icinga2/constants.conf.orig' +maybe chmod 0640 'icinga2/constants.conf.orig' maybe chown 'nagios' 'icinga2/features-available' maybe chgrp 'nagios' 'icinga2/features-available' maybe chmod 0750 'icinga2/features-available' maybe chown 'nagios' 'icinga2/features-available/api.conf' maybe chgrp 'nagios' 'icinga2/features-available/api.conf' maybe chmod 0644 'icinga2/features-available/api.conf' +maybe chown 'nagios' 'icinga2/features-available/api.conf.orig' +maybe chgrp 'nagios' 'icinga2/features-available/api.conf.orig' +maybe chmod 0644 'icinga2/features-available/api.conf.orig' maybe chown 'nagios' 'icinga2/features-available/checker.conf' maybe chgrp 'nagios' 'icinga2/features-available/checker.conf' maybe chmod 0644 'icinga2/features-available/checker.conf' @@ -1059,7 +1065,10 @@ maybe chgrp 'nagios' 'icinga2/features-enabled' maybe chmod 0750 'icinga2/features-enabled' maybe chown 'nagios' 'icinga2/icinga2.conf' maybe chgrp 'nagios' 'icinga2/icinga2.conf' -maybe chmod 0640 'icinga2/icinga2.conf' +maybe chmod 0644 'icinga2/icinga2.conf' +maybe chown 'nagios' 'icinga2/icinga2.conf.orig' +maybe chgrp 'nagios' 'icinga2/icinga2.conf.orig' +maybe chmod 0640 'icinga2/icinga2.conf.orig' maybe chown 'nagios' 'icinga2/pki' maybe chgrp 'nagios' 'icinga2/pki' maybe chmod 0700 'icinga2/pki' @@ -1068,7 +1077,10 @@ maybe chmod 0755 'icinga2/scripts/mail-host-notification.sh' maybe chmod 0755 'icinga2/scripts/mail-service-notification.sh' maybe chown 'nagios' 'icinga2/zones.conf' maybe chgrp 'nagios' 'icinga2/zones.conf' -maybe chmod 0640 'icinga2/zones.conf' +maybe chmod 0644 'icinga2/zones.conf' +maybe chown 'nagios' 'icinga2/zones.conf.orig' +maybe chgrp 'nagios' 'icinga2/zones.conf.orig' +maybe chmod 0640 'icinga2/zones.conf.orig' maybe chown 'nagios' 'icinga2/zones.d' maybe chgrp 'nagios' 'icinga2/zones.d' maybe chmod 0750 'icinga2/zones.d' diff --git a/icinga2/constants.conf b/icinga2/constants.conf index 29232d6..a665fe2 100644 --- a/icinga2/constants.conf +++ b/icinga2/constants.conf @@ -19,10 +19,10 @@ const PluginContribDir = "/usr/lib/nagios/plugins" /* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`. * This should be the common name from the API certificate. */ -//const NodeName = "localhost" +const NodeName = "vserver2.hoellein.online" /* Our local zone name. */ -const ZoneName = NodeName +const ZoneName = "vserver2.hoellein.online" /* Secret key for remote node tickets */ const TicketSalt = "" diff --git a/icinga2/constants.conf.orig b/icinga2/constants.conf.orig new file mode 100644 index 0000000..29232d6 --- /dev/null +++ b/icinga2/constants.conf.orig @@ -0,0 +1,28 @@ +/** + * This file defines global constants which can be used in + * the other configuration files. + */ + +/* The directory which contains the plugins from the Monitoring Plugins project. */ +const PluginDir = "/usr/lib/nagios/plugins" + +/* The directory which contains the Manubulon plugins. + * Check the documentation, chapter "SNMP Manubulon Plugin Check Commands", for details. + */ +const ManubulonPluginDir = "/usr/lib/nagios/plugins" + +/* The directory which you use to store additional plugins which ITL provides user contributed command definitions for. + * Check the documentation, chapter "Plugins Contribution", for details. + */ +const PluginContribDir = "/usr/lib/nagios/plugins" + +/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`. + * This should be the common name from the API certificate. + */ +//const NodeName = "localhost" + +/* Our local zone name. */ +const ZoneName = NodeName + +/* Secret key for remote node tickets */ +const TicketSalt = "" diff --git a/icinga2/features-available/api.conf b/icinga2/features-available/api.conf index b072a44..3706343 100644 --- a/icinga2/features-available/api.conf +++ b/icinga2/features-available/api.conf @@ -1,10 +1,8 @@ /** * The API listener is used for distributed monitoring setups. */ - object ApiListener "api" { - //accept_config = false - //accept_commands = false - - ticket_salt = TicketSalt + accept_config = true + accept_commands = true + bind_host = "icinga.hoellein.online" } diff --git a/icinga2/features-available/api.conf.orig b/icinga2/features-available/api.conf.orig new file mode 100644 index 0000000..b072a44 --- /dev/null +++ b/icinga2/features-available/api.conf.orig @@ -0,0 +1,10 @@ +/** + * The API listener is used for distributed monitoring setups. + */ + +object ApiListener "api" { + //accept_config = false + //accept_commands = false + + ticket_salt = TicketSalt +} diff --git a/icinga2/features-enabled/api.conf b/icinga2/features-enabled/api.conf new file mode 120000 index 0000000..8cdce62 --- /dev/null +++ b/icinga2/features-enabled/api.conf @@ -0,0 +1 @@ +../features-available/api.conf \ No newline at end of file diff --git a/icinga2/features-enabled/notification.conf b/icinga2/features-enabled/notification.conf deleted file mode 120000 index c31d3b4..0000000 --- a/icinga2/features-enabled/notification.conf +++ /dev/null @@ -1 +0,0 @@ -../features-available/notification.conf \ No newline at end of file diff --git a/icinga2/icinga2.conf b/icinga2/icinga2.conf index 17513a3..b968700 100644 --- a/icinga2/icinga2.conf +++ b/icinga2/icinga2.conf @@ -54,4 +54,7 @@ include "features-enabled/*.conf" * the preferred way is to create separate directories and files in the conf.d * directory. Each of these files must have the file extension ".conf". */ -include_recursive "conf.d" +// Disabled by the node setup CLI command on 2023-05-26 11:47:29 +0200 +// Disabled by the node setup CLI command on 2023-05-26 11:54:18 +0200 +// Disabled by the node setup CLI command on 2023-05-26 11:57:21 +0200 +// include_recursive "conf.d" diff --git a/icinga2/icinga2.conf.orig b/icinga2/icinga2.conf.orig new file mode 100644 index 0000000..17513a3 --- /dev/null +++ b/icinga2/icinga2.conf.orig @@ -0,0 +1,57 @@ +/** + * Icinga 2 configuration file + * - this is where you define settings for the Icinga application including + * which hosts/services to check. + * + * For an overview of all available configuration options please refer + * to the documentation that is distributed as part of Icinga 2. + */ + +/** + * The constants.conf defines global constants. + */ +include "constants.conf" + +/** + * The zones.conf defines zones for a cluster setup. + * Not required for single instance setups. + */ +include "zones.conf" + +/** + * The Icinga Template Library (ITL) provides a number of useful templates + * and command definitions. + * Common monitoring plugin command definitions are included separately. + */ +include +include +include +include + +/** + * This includes the Icinga 2 Windows plugins. These command definitions + * are required on a master node when a client is used as command endpoint. + */ +include + +/** + * This includes the NSClient++ check commands. These command definitions + * are required on a master node when a client is used as command endpoint. + */ +include + +/** + * The features-available directory contains a number of configuration + * files for features which can be enabled and disabled using the + * icinga2 feature enable / icinga2 feature disable CLI commands. + * These commands work by creating and removing symbolic links in + * the features-enabled directory. + */ +include "features-enabled/*.conf" + +/** + * Although in theory you could define all your objects in this file + * the preferred way is to create separate directories and files in the conf.d + * directory. Each of these files must have the file extension ".conf". + */ +include_recursive "conf.d" diff --git a/icinga2/zones.conf b/icinga2/zones.conf index 70ac766..7f55fc9 100644 --- a/icinga2/zones.conf +++ b/icinga2/zones.conf @@ -1,63 +1,31 @@ /* - * Endpoint and Zone configuration for a cluster setup - * This local example requires `NodeName` defined in - * constants.conf. + * Generated by Icinga 2 node setup commands + * on 2023-05-26 11:57:18 +0200 */ -object Endpoint NodeName { - host = NodeName +object Endpoint "mail.hoellein.online" { + host = "icinga.hoellein.online" + port = "5665" } -object Zone ZoneName { - endpoints = [ NodeName ] +object Zone "mail.hoellein.online" { + endpoints = [ "mail.hoellein.online" ] } -/* - * Defines a global zone for distributed setups with masters, - * satellites and clients. - * This is required to sync configuration commands, - * templates, apply rules, etc. to satellite and clients. - * All nodes require the same configuration and must - * have `accept_config` enabled in the `api` feature. - */ - -object Zone "global-templates" { - global = true +object Endpoint "vserver2.hoellein.online" { } -/* - * Defines a global zone for the Icinga Director. - * This is required to sync configuration commands, - * templates, apply rules, etc. to satellite and clients. - * All nodes require the same configuration and must - * have `accept_config` enabled in the `api` feature. - */ - -object Zone "director-global" { - global = true +object Zone "vserver2.hoellein.online" { + endpoints = [ "vserver2.hoellein.online" ] + parent = "mail.hoellein.online" } -/* - * Read the documentation on how to configure - * a cluster setup with multiple zones. - */ - -/* -object Endpoint "master.example.org" { - host = "master.example.org" -} - -object Endpoint "satellite.example.org" { - host = "satellite.example.org" +object Zone "global-templates" { + global = true } -object Zone "master" { - endpoints = [ "master.example.org" ] +object Zone "director-global" { + global = true } -object Zone "satellite" { - parent = "master" - endpoints = [ "satellite.example.org" ] -} -*/ diff --git a/icinga2/zones.conf.orig b/icinga2/zones.conf.orig new file mode 100644 index 0000000..70ac766 --- /dev/null +++ b/icinga2/zones.conf.orig @@ -0,0 +1,63 @@ +/* + * Endpoint and Zone configuration for a cluster setup + * This local example requires `NodeName` defined in + * constants.conf. + */ + +object Endpoint NodeName { + host = NodeName +} + +object Zone ZoneName { + endpoints = [ NodeName ] +} + +/* + * Defines a global zone for distributed setups with masters, + * satellites and clients. + * This is required to sync configuration commands, + * templates, apply rules, etc. to satellite and clients. + * All nodes require the same configuration and must + * have `accept_config` enabled in the `api` feature. + */ + +object Zone "global-templates" { + global = true +} + +/* + * Defines a global zone for the Icinga Director. + * This is required to sync configuration commands, + * templates, apply rules, etc. to satellite and clients. + * All nodes require the same configuration and must + * have `accept_config` enabled in the `api` feature. + */ + +object Zone "director-global" { + global = true +} + +/* + * Read the documentation on how to configure + * a cluster setup with multiple zones. + */ + +/* +object Endpoint "master.example.org" { + host = "master.example.org" +} + +object Endpoint "satellite.example.org" { + host = "satellite.example.org" +} + +object Zone "master" { + endpoints = [ "master.example.org" ] +} + +object Zone "satellite" { + parent = "master" + endpoints = [ "satellite.example.org" ] +} +*/ +