From 7b00e7484e159c66b54e84ef4e3d587b35c18360 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Mon, 28 Jun 2021 19:59:54 +0200 Subject: [PATCH] fix monitoring for arch linux hosts --- bundles/pacman/items.py | 1 + bundles/postfix/metadata.py | 2 +- bundles/sshmon/items.py | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bundles/pacman/items.py b/bundles/pacman/items.py index eafc89c..1f6ae0f 100644 --- a/bundles/pacman/items.py +++ b/bundles/pacman/items.py @@ -15,6 +15,7 @@ pkg_pacman = { 'curl': {}, 'dialog': {}, 'diffutils': {}, + 'dnsutils': {}, 'fakeroot': {}, 'file': {}, 'findutils': {}, diff --git a/bundles/postfix/metadata.py b/bundles/postfix/metadata.py index cea5cf1..759f693 100644 --- a/bundles/postfix/metadata.py +++ b/bundles/postfix/metadata.py @@ -14,7 +14,7 @@ defaults = { 'postfix': { 'services': { 'POSTFIX PROCESS': { - 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit postfix@-', + 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit postfix' + ('' if node.os == 'arch' else '@-'), }, 'POSTFIX QUEUE': { 'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_postfix_queue -w 20 -c 40 -d 50', diff --git a/bundles/sshmon/items.py b/bundles/sshmon/items.py index 58ab1ee..3568276 100644 --- a/bundles/sshmon/items.py +++ b/bundles/sshmon/items.py @@ -61,3 +61,12 @@ for check in { files["/usr/local/share/icinga/plugins/check_{}".format(check)] = { 'mode': "0755", } + + +if node.has_bundle('pacman'): + symlinks['/usr/lib/nagios/plugins'] = { + 'target': '/usr/lib/monitoring-plugins', + 'needs': { + 'pkg_pacman:monitoring-plugins', + }, + }