diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ca4cd7f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.yaml] +indent_size = 2 + +# possibly sql dumps +[*.sql] +indent_size = unset diff --git a/bundles/apt/files/kernel-postinst.d b/bundles/apt/files/kernel-postinst.d index 4a2bf03..91641b6 100644 --- a/bundles/apt/files/kernel-postinst.d +++ b/bundles/apt/files/kernel-postinst.d @@ -3,8 +3,8 @@ # /etc/kernel/postinst.d/unattended-upgrades case "$DPKG_MAINTSCRIPT_PACKAGE::$DPKG_MAINTSCRIPT_NAME" in - linux-image-extra*::postrm) - exit 0;; + linux-image-extra*::postrm) + exit 0;; esac if [ -d /var/run ]; then diff --git a/bundles/cron/files/cron_template b/bundles/cron/files/cron_template index 81e7691..86e749a 100644 --- a/bundles/cron/files/cron_template +++ b/bundles/cron/files/cron_template @@ -1,10 +1,3 @@ -# __ ____ -# / /_ __ ______ ____/ / /__ _ ___________ _____ -# / __ \/ / / / __ \/ __ / / _ \ | /| / / ___/ __ `/ __ \ -# / /_/ / /_/ / / / / /_/ / / __/ |/ |/ / / / /_/ / /_/ / -#/_.___/\__,_/_/ /_/\__,_/_/\___/|__/|__/_/ \__,_/ .___/ -# /_/ -# # CAUTION! This file is managed with bundlewrap. # Any manual edits will be lost! diff --git a/bundles/cron/files/crontab b/bundles/cron/files/crontab index 0c6b908..041f0de 100644 --- a/bundles/cron/files/crontab +++ b/bundles/cron/files/crontab @@ -1,10 +1,3 @@ -# __ ____ -# / /_ __ ______ ____/ / /__ _ ___________ _____ -# / __ \/ / / / __ \/ __ / / _ \ | /| / / ___/ __ `/ __ \ -# / /_/ / /_/ / / / / /_/ / / __/ |/ |/ / / / /_/ / /_/ / -#/_.___/\__,_/_/ /_/\__,_/_/\___/|__/|__/_/ \__,_/ .___/ -# /_/ -# # CAUTION! This file is managed with bundlewrap. # Any manual edits will be lost! diff --git a/bundles/dovecot/files/learn-ham.sieve b/bundles/dovecot/files/learn-ham.sieve index a9d30cf..95e04a1 100644 --- a/bundles/dovecot/files/learn-ham.sieve +++ b/bundles/dovecot/files/learn-ham.sieve @@ -1,15 +1,15 @@ require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"]; if environment :matches "imap.mailbox" "*" { - set "mailbox" "${1}"; + set "mailbox" "${1}"; } if string "${mailbox}" "Trash" { - stop; + stop; } if environment :matches "imap.user" "*" { - set "username" "${1}"; + set "username" "${1}"; } pipe :copy "sa-learn-ham.sh" [ "${username}" ]; diff --git a/bundles/dovecot/files/learn-spam.sieve b/bundles/dovecot/files/learn-spam.sieve index 4dda267..9f35855 100644 --- a/bundles/dovecot/files/learn-spam.sieve +++ b/bundles/dovecot/files/learn-spam.sieve @@ -1,7 +1,7 @@ require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"]; if environment :matches "imap.user" "*" { - set "username" "${1}"; + set "username" "${1}"; } pipe :copy "sa-learn-spam.sh" [ "${username}" ]; diff --git a/bundles/icinga2/files/icinga2/api-users.conf b/bundles/icinga2/files/icinga2/api-users.conf index 77e3737..822b152 100644 --- a/bundles/icinga2/files/icinga2/api-users.conf +++ b/bundles/icinga2/files/icinga2/api-users.conf @@ -1,7 +1,7 @@ % for user, config in sorted(node.metadata.get('icinga2', {}).get('api_users', {}).items()): object ApiUser "${user}" { - password = "${config['password']}" - permissions = [ "${'", "'.join(sorted(config['permissions']))}" ] + password = "${config['password']}" + permissions = [ "${'", "'.join(sorted(config['permissions']))}" ] } % endfor diff --git a/bundles/icinga2/files/icinga2/downtimes.conf b/bundles/icinga2/files/icinga2/downtimes.conf index cb00e32..e78da7c 100644 --- a/bundles/icinga2/files/icinga2/downtimes.conf +++ b/bundles/icinga2/files/icinga2/downtimes.conf @@ -1,18 +1,18 @@ % for monitored_node in sorted(monitored_nodes): % if not monitored_node.dummy: object ScheduledDowntime "unattended_upgrades" { - host_name = "${monitored_node.name}" + host_name = "${monitored_node.name}" - author = "upgrade-and-reboot" - comment = "Downtime for upgrade-and-reboot" + author = "upgrade-and-reboot" + comment = "Downtime for upgrade-and-reboot" - fixed = true + fixed = true - ranges = { - "${days[monitored_node.metadata.get('apt', {}).get('unattended_upgrades', {}).get('day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(monitored_node.magic_number%30)+30}" - } + ranges = { + "${days[monitored_node.metadata.get('apt', {}).get('unattended_upgrades', {}).get('day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(monitored_node.magic_number%30)+30}" + } - child_options = "DowntimeTriggeredChildren" + child_options = "DowntimeTriggeredChildren" } % endif % endfor diff --git a/bundles/icinga2/files/icinga2/groups.conf b/bundles/icinga2/files/icinga2/groups.conf index 8431c61..8f82a97 100644 --- a/bundles/icinga2/files/icinga2/groups.conf +++ b/bundles/icinga2/files/icinga2/groups.conf @@ -1,33 +1,33 @@ % for group in sorted(repo.groups): object HostGroup "group-${group.name}" { - display_name = "bw group ${group.name}" + display_name = "bw group ${group.name}" - assign where "${group.name}" in host.vars.bw_groups + assign where "${group.name}" in host.vars.bw_groups } % endfor % for bundle in sorted(bundles): object ServiceGroup "bundle-${bundle}" { - display_name = "bw bundle ${bundle}" + display_name = "bw bundle ${bundle}" - assign where service.vars.bundle == "${bundle}" + assign where service.vars.bundle == "${bundle}" } % endfor object ServiceGroup "checks_with_mail" { - display_name = "Checks which send E-Mails" + display_name = "Checks which send E-Mails" - assign where service.vars.notification.mail == true + assign where service.vars.notification.mail == true } object HostGroup "checks_with_sms" { - display_name = "Hosts which send SMS" + display_name = "Hosts which send SMS" - assign where host.vars.notification.sms == true + assign where host.vars.notification.sms == true } object ServiceGroup "checks_with_sms" { - display_name = "Checks which send SMS" + display_name = "Checks which send SMS" - assign where service.vars.notification.sms == true + assign where service.vars.notification.sms == true } diff --git a/bundles/icinga2/files/icinga2/hosts.conf b/bundles/icinga2/files/icinga2/hosts.conf index c4e5f1f..a115fe0 100644 --- a/bundles/icinga2/files/icinga2/hosts.conf +++ b/bundles/icinga2/files/icinga2/hosts.conf @@ -1,21 +1,21 @@ % for monitored_node in sorted(monitored_nodes): object Host "${monitored_node.name}" { - import "generic-host" + import "generic-host" - address = "${monitored_node.metadata.get('icinga_options', {}).get('hostname', monitored_node.hostname)}" + address = "${monitored_node.metadata.get('icinga_options', {}).get('hostname', monitored_node.hostname)}" - vars.os = "${monitored_node.os}" - vars.sla = "${monitored_node.metadata.get('sla', '24x7')}" - vars.period = "${sla_info[monitored_node.metadata.get('sla', '24x7')]}" - vars.location = "${monitored_node.metadata.get('location', 'unknown')}" - vars.bw_groups = [ "${'", "'.join(sorted({group.name for group in monitored_node.groups}))}" ] - vars.notification.sms = ${str(monitored_node.metadata.get('icinga_options', {}).get('vars.notification.sms', True)).lower()} - vars.notification.mail = true + vars.os = "${monitored_node.os}" + vars.sla = "${monitored_node.metadata.get('sla', '24x7')}" + vars.period = "${sla_info[monitored_node.metadata.get('sla', '24x7')]}" + vars.location = "${monitored_node.metadata.get('location', 'unknown')}" + vars.bw_groups = [ "${'", "'.join(sorted({group.name for group in monitored_node.groups}))}" ] + vars.notification.sms = ${str(monitored_node.metadata.get('icinga_options', {}).get('vars.notification.sms', True)).lower()} + vars.notification.mail = true } % endfor apply Dependency "disable-service-checks-on-host-down" to Service { - disable_checks = true - ignore_soft_states = true - assign where true + disable_checks = true + ignore_soft_states = true + assign where true } diff --git a/bundles/icinga2/files/icinga2/ido-pgsql.conf b/bundles/icinga2/files/icinga2/ido-pgsql.conf index a252e01..e2b1f57 100644 --- a/bundles/icinga2/files/icinga2/ido-pgsql.conf +++ b/bundles/icinga2/files/icinga2/ido-pgsql.conf @@ -1,8 +1,8 @@ library "db_ido_pgsql" object IdoPgsqlConnection "ido-pgsql" { - user = "icinga2", - password = "${node.metadata['postgresql']['roles']['icinga2']['password']}", - host = "localhost", - database = "icinga2" + user = "icinga2", + password = "${node.metadata['postgresql']['roles']['icinga2']['password']}", + host = "localhost", + database = "icinga2" } diff --git a/bundles/icinga2/files/icinga2/notification_commands.conf b/bundles/icinga2/files/icinga2/notification_commands.conf index a1ba8ad..c6d4cc5 100644 --- a/bundles/icinga2/files/icinga2/notification_commands.conf +++ b/bundles/icinga2/files/icinga2/notification_commands.conf @@ -1,74 +1,74 @@ object NotificationCommand "send-host-notification" { - import "plugin-notification-command" + import "plugin-notification-command" - command = [ ConfigDir + "/scripts/icinga_notification_wrapper" ] + command = [ ConfigDir + "/scripts/icinga_notification_wrapper" ] - arguments = { - "--mail" = { - set_if = {{ - host_vars = host.vars - if (host_vars.notification.mail == true) { - return true - } else { - return false + arguments = { + "--mail" = { + set_if = {{ + host_vars = host.vars + if (host_vars.notification.mail == true) { + return true + } else { + return false + } + }} + value = "$user.email$" } - }} - value = "$user.email$" - } - "--sms" = { - set_if = {{ - host_vars = host.vars - if (host_vars.notification.sms == true) { - return true - } else { - return false + "--sms" = { + set_if = {{ + host_vars = host.vars + if (host_vars.notification.sms == true) { + return true + } else { + return false + } + }} + value = "$user.vars.mobile$" + } + "--host_name" = "$host.display_name$" + "--state" = "$host.state$" + "--output" = "$host.output$" + "--escalation" = { + set_if = "$escalation$" } - }} - value = "$user.vars.mobile$" } - "--host_name" = "$host.display_name$" - "--state" = "$host.state$" - "--output" = "$host.output$" - "--escalation" = { - set_if = "$escalation$" - } - } } object NotificationCommand "send-service-notification" { - import "plugin-notification-command" + import "plugin-notification-command" - command = [ ConfigDir + "/scripts/icinga_notification_wrapper" ] + command = [ ConfigDir + "/scripts/icinga_notification_wrapper" ] - arguments = { - "--mail" = { - set_if = {{ - svc_vars = service.vars - if (svc_vars.notification.mail == true) { - return true - } else { - return false + arguments = { + "--mail" = { + set_if = {{ + svc_vars = service.vars + if (svc_vars.notification.mail == true) { + return true + } else { + return false + } + }} + value = "$user.email$" } - }} - value = "$user.email$" - } - "--sms" = { - set_if = {{ - svc_vars = service.vars - if (svc_vars.notification.sms == true) { - return true - } else { - return false + "--sms" = { + set_if = {{ + svc_vars = service.vars + if (svc_vars.notification.sms == true) { + return true + } else { + return false + } + }} + value = "$user.vars.mobile$" + } + "--host_name" = "$host.display_name$" + "--service_name" = "$service.display_name$" + "--state" = "$service.state$" + "--output" = "$service.output$" + "--escalation" = { + set_if = "$escalation$" } - }} - value = "$user.vars.mobile$" } - "--host_name" = "$host.display_name$" - "--service_name" = "$service.display_name$" - "--state" = "$service.state$" - "--output" = "$service.output$" - "--escalation" = { - set_if = "$escalation$" - } - } } diff --git a/bundles/icinga2/files/icinga2/notifications.conf b/bundles/icinga2/files/icinga2/notifications.conf index ad59b34..e4c293c 100644 --- a/bundles/icinga2/files/icinga2/notifications.conf +++ b/bundles/icinga2/files/icinga2/notifications.conf @@ -1,61 +1,61 @@ apply Notification "notify_host-notification" to Host { - import "host-notification" - interval = 30m + import "host-notification" + interval = 30m - times = { - begin = 1m - end = 30m - } + times = { + begin = 1m + end = 30m + } - assign where host.vars.notification.sms == true + assign where host.vars.notification.sms == true } apply Notification "notify_service-notification" to Service { - import "service-notification" - interval = 30m + import "service-notification" + interval = 30m - times = { - begin = 1m - end = 30m - } + times = { + begin = 1m + end = 30m + } - assign where service.vars.notification.sms == true + assign where service.vars.notification.sms == true } apply Notification "notify_host-notification-escalation" to Host { - import "host-notification" - interval = 20m + import "host-notification" + interval = 20m - times = { - begin = 30m - } + times = { + begin = 30m + } - vars.escalation = true + vars.escalation = true - assign where host.vars.notification.sms == true + assign where host.vars.notification.sms == true } apply Notification "notify_service-notification-escalation" to Service { - import "service-notification" - interval = 20m + import "service-notification" + interval = 20m - times = { - begin = 30m - } + times = { + begin = 30m + } - vars.escalation = true + vars.escalation = true - assign where service.vars.notification.sms == true + assign where service.vars.notification.sms == true } apply Notification "notify_service-notification-mail" to Service { - import "service-notification" - interval = 0 + import "service-notification" + interval = 0 - assign where service.vars.notification.mail == true - ignore where service.vars.notification.sms == true + assign where service.vars.notification.mail == true + ignore where service.vars.notification.sms == true } diff --git a/bundles/icinga2/files/icinga2/services_template.conf b/bundles/icinga2/files/icinga2/services_template.conf index 76a8ff0..635b3a5 100644 --- a/bundles/icinga2/files/icinga2/services_template.conf +++ b/bundles/icinga2/files/icinga2/services_template.conf @@ -1,22 +1,22 @@ % for node_data, icingaconf in sorted(bundle_metadata.items()): -% for service, config in sorted(icingaconf.items()): +% for service, config in sorted(icingaconf.items()): object Service "${service}" { - import "generic-service" - host_name = "${node_data.name}" -% for k, v in sorted(config.items()): -% if k not in {'import', 'command_on_monitored_host'} and not k.startswith('vars.notification'): -% if isinstance(v, bool) or isinstance(v, int) or k in ["check_interval", "retry_interval"]: - ${k} = ${str(v).lower()} -% elif isinstance(v, list): - ${k} = [${", ".join(['"' + i + '"' for i in v])}] -% else: - ${k} = "${v}" -% endif -% endif -% endfor - vars.bundle = "${bundle_name}" - vars.notification.sms = ${str(config.get('vars.notification.sms', False)).lower()} - vars.notification.mail = ${str(config.get('vars.notification.mail', False)).lower()} + import "generic-service" + host_name = "${node_data.name}" +% for k, v in sorted(config.items()): +% if k not in {'import', 'command_on_monitored_host'} and not k.startswith('vars.notification'): +% if isinstance(v, bool) or isinstance(v, int) or k in ["check_interval", "retry_interval"]: + ${k} = ${str(v).lower()} +% elif isinstance(v, list): + ${k} = [${", ".join(['"' + i + '"' for i in v])}] +% else: + ${k} = "${v}" +% endif +% endif +% endfor + vars.bundle = "${bundle_name}" + vars.notification.sms = ${str(config.get('vars.notification.sms', False)).lower()} + vars.notification.mail = ${str(config.get('vars.notification.mail', False)).lower()} } -% endfor +% endfor % endfor diff --git a/bundles/icinga2/files/icinga2/templates.conf b/bundles/icinga2/files/icinga2/templates.conf index 5bc6255..bbb944c 100644 --- a/bundles/icinga2/files/icinga2/templates.conf +++ b/bundles/icinga2/files/icinga2/templates.conf @@ -68,8 +68,8 @@ template Notification "service-notification" { user_groups = [ "on-call_sms" ] if(service.vars.period) { - period = service.vars.period + period = service.vars.period } else { - period = host.vars.period + period = host.vars.period } } diff --git a/bundles/icinga2/files/icinga2/timeperiods.conf b/bundles/icinga2/files/icinga2/timeperiods.conf index d45d31b..eb1953d 100644 --- a/bundles/icinga2/files/icinga2/timeperiods.conf +++ b/bundles/icinga2/files/icinga2/timeperiods.conf @@ -1,35 +1,35 @@ object TimePeriod "24x7" { - import "legacy-timeperiod" + import "legacy-timeperiod" - display_name = "24x7" - ranges = { - "monday" = "00:00-24:00" - "tuesday" = "00:00-24:00" - "wednesday" = "00:00-24:00" - "thursday" = "00:00-24:00" - "friday" = "00:00-24:00" - "saturday" = "00:00-24:00" - "sunday" = "00:00-24:00" - } + display_name = "24x7" + ranges = { + "monday" = "00:00-24:00" + "tuesday" = "00:00-24:00" + "wednesday" = "00:00-24:00" + "thursday" = "00:00-24:00" + "friday" = "00:00-24:00" + "saturday" = "00:00-24:00" + "sunday" = "00:00-24:00" + } } object TimePeriod "weekdays_9to6" { - import "legacy-timeperiod" + import "legacy-timeperiod" - display_name = "9to6 (UTC)" - ranges = { - "monday" = "09:00-18:00" - "tuesday" = "09:00-18:00" - "wednesday" = "09:00-18:00" - "thursday" = "09:00-18:00" - "friday" = "09:00-18:00" - } + display_name = "9to6 (UTC)" + ranges = { + "monday" = "09:00-18:00" + "tuesday" = "09:00-18:00" + "wednesday" = "09:00-18:00" + "thursday" = "09:00-18:00" + "friday" = "09:00-18:00" + } } object TimePeriod "never" { - import "legacy-timeperiod" + import "legacy-timeperiod" - display_name = "never" - ranges = { - } + display_name = "never" + ranges = { + } } diff --git a/bundles/icinga2/files/icinga2/users.conf b/bundles/icinga2/files/icinga2/users.conf index e60615c..8a918ae 100644 --- a/bundles/icinga2/files/icinga2/users.conf +++ b/bundles/icinga2/files/icinga2/users.conf @@ -4,20 +4,20 @@ object UserGroup "on-call_sms" { % for username, config in sorted(node.metadata.get('icinga2', {}).get('icinga_users', {}).items()): object User "${username}" { - display_name = "${username}" - enable_notifications = true - period = "24x7" + display_name = "${username}" + enable_notifications = true + period = "24x7" % if not config['is_admin']: - states = [ OK, Warning, Critical, Up, Down ] - types = [ Problem, Recovery ] + states = [ OK, Warning, Critical, Up, Down ] + types = [ Problem, Recovery ] % endif % if config['is_admin'] and (config['email'] or config['phone']): - groups = [ "on-call_sms" ] + groups = [ "on-call_sms" ] % endif - email = "${config['email']}" - vars.mobile = "${config['phone']}" + email = "${config['email']}" + vars.mobile = "${config['phone']}" } % endfor diff --git a/bundles/icinga2/files/scripts/icinga_notification_wrapper b/bundles/icinga2/files/scripts/icinga_notification_wrapper index 5709c70..1fe43b0 100644 --- a/bundles/icinga2/files/scripts/icinga_notification_wrapper +++ b/bundles/icinga2/files/scripts/icinga_notification_wrapper @@ -90,6 +90,7 @@ def notify_per_sms(): def notify_per_mail(): + # editorconfig-checker-disable text = """ _ _ (_)____(_)___ ____ _____ _ @@ -108,6 +109,7 @@ Service: {service}""" State: {state} {output}""" + # editorconfig-checker-enable mail = email.mime.text.MIMEText(text.format( host=args.host_name, diff --git a/bundles/icinga2/metadata.py b/bundles/icinga2/metadata.py index f22f62f..149f111 100644 --- a/bundles/icinga2/metadata.py +++ b/bundles/icinga2/metadata.py @@ -17,12 +17,6 @@ defaults = { 'icingaweb2': {}, 'icingaweb2-module-monitoring': {}, - # needed for check_rbl - 'libdata-validate-ip-perl': {}, - 'libmonitoring-plugin-perl': {}, - 'libnet-dns-perl': {}, - 'libreadonly-perl': {}, - # neeeded for statusmonitor 'python3-flask': {}, } diff --git a/bundles/letsencrypt/files/hook.sh b/bundles/letsencrypt/files/hook.sh index 11d294a..2c3290f 100644 --- a/bundles/letsencrypt/files/hook.sh +++ b/bundles/letsencrypt/files/hook.sh @@ -33,5 +33,5 @@ exit_hook() {<%text> <%text> HANDLER="$1"; shift if [[ "${HANDLER}" =~ ^(deploy_cert|exit_hook)$ ]]; then - "$HANDLER" "$@" + "$HANDLER" "$@" fi diff --git a/bundles/matrix-synapse/files/homeserver.yaml b/bundles/matrix-synapse/files/homeserver.yaml index cb76cc7..27b8c7a 100644 --- a/bundles/matrix-synapse/files/homeserver.yaml +++ b/bundles/matrix-synapse/files/homeserver.yaml @@ -77,11 +77,11 @@ suppress_key_server_warning: true %endif password_config: - enabled: true + enabled: true email: - enable_notifs: false - notif_from: "Matrix is_success) { $InfoData = sprintf (" %.3f sec. response time, Active: %d (Writing: %d Reading: %d Waiting: %d)" . " ReqPerSec: %.3f ConnPerSec: %.3f ReqPerConn: %.3f" ,$timeelapsed,$ActiveConn,$Writing,$Reading,$Waiting,$ReqPerSec,$ConnPerSec,$ReqPerConn); - + # Manage warn and crit values for the perfdata my $p_warn_a_level = "$o_warn_a_level"; my $p_crit_a_level = "$o_crit_a_level"; my $p_warn_rps_level = "$o_warn_rps_level"; my $p_crit_rps_level = "$o_crit_rps_level"; my $p_warn_cps_level = "$o_warn_cps_level"; - my $p_crit_cps_level = "$o_crit_cps_level"; + my $p_crit_cps_level = "$o_crit_cps_level"; if ($p_warn_a_level == "-1") { $p_warn_a_level = ""; @@ -438,7 +439,7 @@ if ($response->is_success) { if ($p_crit_cps_level == "-1") { $p_crit_cps_level = ""; } - + $PerfData = sprintf ("Writing=%d;;;; Reading=%d;;;; Waiting=%d;;;; Active=%d;%s;%s;; " . "ReqPerSec=%f;%s;%s;; ConnPerSec=%f;%s;%s;; ReqPerConn=%f;;;;" ,($Writing),($Reading),($Waiting),($ActiveConn) diff --git a/bundles/postfix/files/check_postfix_queue b/bundles/postfix/files/check_postfix_queue index 5bd7896..2fae37b 100644 --- a/bundles/postfix/files/check_postfix_queue +++ b/bundles/postfix/files/check_postfix_queue @@ -1,4 +1,5 @@ #!/bin/bash +# editorconfig-checker-disable-file # created by McArt http://www.mcart.ru/ # Uncomment to enable debugging @@ -91,7 +92,7 @@ fi check_postfix_mailqueue() { # Can be set via environment, but default is fetched by postconf (if available, -# else /var/spool/postfix) +# else /var/spool/postfix) if which postconf > /dev/null ; then SPOOLDIR=${spooldir:-`postconf -h queue_directory`} else diff --git a/bundles/powerdns/files/named.conf b/bundles/powerdns/files/named.conf index 925e314..196e3f5 100644 --- a/bundles/powerdns/files/named.conf +++ b/bundles/powerdns/files/named.conf @@ -1,6 +1,6 @@ % for zone in sorted(zones): zone "${zone}" { - file "/var/lib/powerdns/zones/${zone}"; - type native; + file "/var/lib/powerdns/zones/${zone}"; + type native; }; % endfor diff --git a/bundles/smartd/files/check_smart b/bundles/smartd/files/check_smart index 0fa0c33..e8318ed 100644 --- a/bundles/smartd/files/check_smart +++ b/bundles/smartd/files/check_smart @@ -1,4 +1,5 @@ #!/usr/bin/perl -w +# editorconfig-checker-disable-file # Check SMART status of ATA/SCSI/NVMe drives, returning any usable metrics as perfdata. # For usage information, run ./check_smart -h # @@ -105,7 +106,7 @@ if ($opt_d || $opt_g ) { # normal mode - push opt_d on the list of devices push(@dev,$opt_d); } else { - # glob all devices - try '?' first + # glob all devices - try '?' first @dev =glob($opt_g); } @@ -222,8 +223,8 @@ foreach $device ( split(":",$device) ){ # we had a pattern based on $opt_g $tag = $device; $tag =~ s/\Q$opt_g\E//; - if($interface =~ qr/(?:megaraid|3ware|cciss)/){ - $label = "[$interface] - "; + if($interface =~ qr/(?:megaraid|3ware|cciss)/){ + $label = "[$interface] - "; } else { $label = "[$device] - "; } @@ -428,7 +429,7 @@ foreach $device ( split(":",$device) ){ warn "(debug) Exclude List for Checks: ", join(",", @exclude_checks), "\n" if $opt_debug; warn "(debug) Exclude List for Perfdata: ", join(",", @exclude_perfdata), "\n" if $opt_debug; warn "(debug) Warning Thresholds:\n" if $opt_debug; - for my $warnpair ( sort keys %warn_list ) { warn "$warnpair=$warn_list{$warnpair}\n" if $opt_debug; } + for my $warnpair ( sort keys %warn_list ) { warn "$warnpair=$warn_list{$warnpair}\n" if $opt_debug; } warn "\n" if $opt_debug; # separate metric-gathering and output analysis for ATA vs SCSI SMART output @@ -673,11 +674,11 @@ foreach $device ( split(":",$device) ){ } warn "(debug) gathered perfdata:\n@perfdata\n\n" if $opt_debug; $perf_string = join(' ', @perfdata); - + warn "###########################################################\n" if $opt_debug; warn "(debug) LOCAL STATUS: $exit_status_local, FINAL STATUS: $exit_status\n" if $opt_debug; warn "###########################################################\n\n\n" if $opt_debug; - + if($exit_status_local ne 'OK'){ if ($opt_g) { $status_string = $label.join(', ', @error_messages); @@ -687,7 +688,7 @@ foreach $device ( split(":",$device) ){ $status_string = join(', ', @error_messages); } push @drives_status_not_okay, $status_string; - } + } else { if ($opt_g) { $status_string = $label."Device is clean"; diff --git a/bundles/sshmon/files/check_ram b/bundles/sshmon/files/check_ram index 525c556..0e01285 100644 --- a/bundles/sshmon/files/check_ram +++ b/bundles/sshmon/files/check_ram @@ -1,13 +1,14 @@ #!/bin/bash -# +# editorconfig-checker-disable-file +# # Plugin to check free ram space # using check_by_ssh # by Markus Walther (voltshock@gmx.de) # The script needs a working check_by_ssh connection and needs to run on the client to check it -# +# # Command-Line for check_by_ssh # command_line $USER1$/check_by_ssh -H $HOSTNAME$ -p $ARG1$ -C "$ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$" -# +# # Command-Line for service (example) # check_by_ssh!82!/nagios/check_ram.sh!20!10 # diff --git a/bundles/unbound/files/netdata-unbound.conf b/bundles/unbound/files/netdata-unbound.yaml similarity index 100% rename from bundles/unbound/files/netdata-unbound.conf rename to bundles/unbound/files/netdata-unbound.yaml diff --git a/bundles/unbound/items.py b/bundles/unbound/items.py index 03c4a60..c3bb352 100644 --- a/bundles/unbound/items.py +++ b/bundles/unbound/items.py @@ -45,7 +45,7 @@ if node.has_bundle('systemd-networkd'): if node.has_bundle('netdata'): files['/etc/netdata/go.d/unbound.conf'] = { - 'source': 'netdata-unbound.conf', + 'source': 'netdata-unbound.yaml', 'triggers': { 'svc_systemd:netdata:restart', }, diff --git a/bundles/wide-dhcp6c/files/dhcp6c.conf b/bundles/wide-dhcp6c/files/dhcp6c.conf index 05ec14c..29f7ef5 100644 --- a/bundles/wide-dhcp6c/files/dhcp6c.conf +++ b/bundles/wide-dhcp6c/files/dhcp6c.conf @@ -13,5 +13,5 @@ id-assoc pd 0 { }; profile default { - information-only; + information-only; }; diff --git a/data/apt/files/gpg-keys/postgresql.asc b/data/apt/files/gpg-keys/postgresql.asc index f75c51f..23b77f5 100644 --- a/data/apt/files/gpg-keys/postgresql.asc +++ b/data/apt/files/gpg-keys/postgresql.asc @@ -89,4 +89,4 @@ xXqzmNnloA1T7VjwPqIIzkj/u0V8nICG/ktLzp1OsCFatWXh7LbU+hwYl6gsFH/mFDqVxJ3+ DKQivyf1NatzEwl62foVjGUSpvh3ymtmtUQ4JUkNDsXiRBWczaiGSuzD9Qi0ONdkAX3bewqm N4TfE+XIpCPxxHXwGq9Rv1IFjOdCX0iG436GHyTLC1tTUIKF5xV4Y0+cXIM= =hqgj ------END PGP PUBLIC KEY BLOCK----- +-----END PGP PUBLIC KEY BLOCK----- diff --git a/data/nginx/files/extras/htz-cloud.sewfile/sewfile.franzi.business b/data/nginx/files/extras/htz-cloud.sewfile/sewfile.franzi.business index 5f868f6..20c4040 100644 --- a/data/nginx/files/extras/htz-cloud.sewfile/sewfile.franzi.business +++ b/data/nginx/files/extras/htz-cloud.sewfile/sewfile.franzi.business @@ -1,12 +1,12 @@ client_max_body_size 0; location / { - proxy_pass http://127.0.0.1:8000; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - proxy_read_timeout 1200s; + proxy_pass http://127.0.0.1:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_read_timeout 1200s; } location /seafhttp { diff --git a/data/nginx/files/extras/htz.ex42-1048908/wiki.franzi.business b/data/nginx/files/extras/htz.ex42-1048908/wiki.franzi.business index d57d264..cc1fc01 100644 --- a/data/nginx/files/extras/htz.ex42-1048908/wiki.franzi.business +++ b/data/nginx/files/extras/htz.ex42-1048908/wiki.franzi.business @@ -1,5 +1,5 @@ location ~ /(data|conf|bin|inc|vendor)/ { - deny all; + deny all; } location / { try_files $uri $uri/ @dokuwiki; } diff --git a/data/users/files/tmux/sophie.conf b/data/users/files/tmux/sophie.conf index 0bc5fca..39d4ba8 100644 --- a/data/users/files/tmux/sophie.conf +++ b/data/users/files/tmux/sophie.conf @@ -44,12 +44,12 @@ set -g base-index 1 # Allows for faster key repetition set -s escape-time 0 -# Rather than constraining window size to the maximum size of any client -# connected to the *session*, constrain window size to the maximum size of any +# Rather than constraining window size to the maximum size of any client +# connected to the *session*, constrain window size to the maximum size of any # client connected to *that window*. Much more reasonable. setw -g aggressive-resize on -# Allows us to use C-a a to send commands to a TMUX session inside +# Allows us to use C-a a to send commands to a TMUX session inside # another TMUX session bind-key a send-prefix