aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/modules/nagios/manifests
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-02-03 22:10:23 +0100
committeralex <alex@pdp7.net>2023-02-03 22:10:23 +0100
commit0bc39913db6530ca9f64835e3beff5fbad8fb05e (patch)
tree03ec49962d0c29d3b73f90c218cf52bf45edf991 /personal_infra/puppet/modules/nagios/manifests
parent8e54f471100c737585c89a69efcd1eb0ea22f52e (diff)
Refine basic Linux monitoring
* Add ragent * Use servicegroups/hostgroups
Diffstat (limited to 'personal_infra/puppet/modules/nagios/manifests')
-rw-r--r--personal_infra/puppet/modules/nagios/manifests/init.pp44
1 files changed, 44 insertions, 0 deletions
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':