From f305b5c3af84333bb99d31919e1541e157053a91 Mon Sep 17 00:00:00 2001 From: mhoellein Date: Fri, 10 Jul 2020 13:08:00 +0200 Subject: [PATCH] saving uncommitted changes in /etc prior to apt run --- .etckeeper | 8 +++++++- icinga2/conf.d/api-users.conf | 9 +++++++++ icinga2/constants.conf | 4 ++-- icinga2/constants.conf.orig | 28 ++++++++++++++++++++++++++++ icinga2/features-enabled/api.conf | 1 + 5 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 icinga2/conf.d/api-users.conf create mode 100644 icinga2/constants.conf.orig create mode 120000 icinga2/features-enabled/api.conf diff --git a/.etckeeper b/.etckeeper index 311aaffe..600661c9 100755 --- a/.etckeeper +++ b/.etckeeper @@ -2738,6 +2738,9 @@ maybe chmod 0750 'icinga2' maybe chown 'nagios' 'icinga2/conf.d' maybe chgrp 'nagios' 'icinga2/conf.d' maybe chmod 0750 'icinga2/conf.d' +maybe chown 'nagios' 'icinga2/conf.d/api-users.conf' +maybe chgrp 'nagios' 'icinga2/conf.d/api-users.conf' +maybe chmod 0644 'icinga2/conf.d/api-users.conf' maybe chown 'nagios' 'icinga2/conf.d/app.conf' maybe chgrp 'nagios' 'icinga2/conf.d/app.conf' maybe chmod 0644 'icinga2/conf.d/app.conf' @@ -2773,7 +2776,10 @@ 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' diff --git a/icinga2/conf.d/api-users.conf b/icinga2/conf.d/api-users.conf new file mode 100644 index 00000000..fdfd3d7f --- /dev/null +++ b/icinga2/conf.d/api-users.conf @@ -0,0 +1,9 @@ +/** + * The ApiUser objects are used for authentication against the API. + */ +object ApiUser "root" { + password = "1c792f53515736aa" + // client_cn = "" + + permissions = [ "*" ] +} diff --git a/icinga2/constants.conf b/icinga2/constants.conf index 29232d61..5df1e29d 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 = "homeserver" /* Our local zone name. */ -const ZoneName = NodeName +const ZoneName = "homeserver" /* 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 00000000..29232d61 --- /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-enabled/api.conf b/icinga2/features-enabled/api.conf new file mode 120000 index 00000000..8cdce62b --- /dev/null +++ b/icinga2/features-enabled/api.conf @@ -0,0 +1 @@ +../features-available/api.conf \ No newline at end of file -- 2.43.0