From b5305b5cad5cbb0a2c072b29f2d4dc05126c39d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 8 Jul 2018 21:51:30 +0200 Subject: Add postgresql monitoring --- modules/profile/manifests/monitoring/services.pp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'modules/profile/manifests/monitoring/services.pp') diff --git a/modules/profile/manifests/monitoring/services.pp b/modules/profile/manifests/monitoring/services.pp index 6e59ab1..b20a352 100644 --- a/modules/profile/manifests/monitoring/services.pp +++ b/modules/profile/manifests/monitoring/services.pp @@ -1,21 +1,5 @@ class profile::monitoring::services { - Nagios_service { - ensure => "present", - owner => "naemon", - group => "naemon", - notify => Service["naemon"], - before => Service["naemon"], - require => File["/etc/naemon"], - } - - sudo::conf { - default: - sudo_file_name => "naemon"; - 'naemon-fail2ban': - content => "naemon ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping"; - } - profile::monitoring::local_service { "Size on root partition": local => { @@ -34,9 +18,11 @@ class profile::monitoring::services { check_command => "check_local_swap!20!10", }; "fail2ban is active": - local => { + sudos => { + "naemon-fail2ban" => "naemon ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping", + }, + local => { check_command => "check_command_output!fail2ban-client ping!pong!-r root", - require => Sudo::Conf["naemon-fail2ban"], }; "NTP is activated and working": local => { @@ -50,4 +36,6 @@ class profile::monitoring::services { check_command => "check_md_raid", }; } + + Profile::Monitoring::Local_service <| |> } -- cgit v1.2.3