From 0bc39913db6530ca9f64835e3beff5fbad8fb05e Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 3 Feb 2023 22:10:23 +0100 Subject: Refine basic Linux monitoring * Add ragent * Use servicegroups/hostgroups --- .../puppet/modules/nagios/manifests/init.pp | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'personal_infra/puppet/modules/nagios/manifests') diff --git a/personal_infra/puppet/modules/nagios/manifests/init.pp b/personal_infra/puppet/modules/nagios/manifests/init.pp index 48aaf0a8..5568fbf9 100644 --- a/personal_infra/puppet/modules/nagios/manifests/init.pp +++ b/personal_infra/puppet/modules/nagios/manifests/init.pp @@ -41,6 +41,50 @@ class nagios { owner => 'nagios', } + nagios_command {'check_ragent': + command_name => 'check_ragent', + command_line => '/usr/bin/check_ragent http://$HOSTADDRESS$:21488/ --warning-units dnf-makecache.service --warning-units dnf-automatic-install.service', + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + } + + nagios_hostgroup {'linux': + hostgroup_name => 'linux', + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + ensure => present, + } + + nagios_servicegroup {'ragent': + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + ensure => present, + } + + nagios_service {'check_ragent': + use => 'generic-service', + hostgroup_name => 'linux', + service_description => 'check_ragent', + servicegroups => 'ragent', + check_command => 'check_ragent', + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + } + + nagios_service {'check_ssh': + use => 'generic-service', + hostgroup_name => 'linux', + service_description => 'ssh', + check_command => 'check_ssh', + require => Package['nagios'], + notify => Service['nagios'], + owner => 'nagios', + } + package {'httpd':} -> service {'httpd': -- cgit v1.2.3