]> xn--ix-yja.es Git - alex.git/commitdiff
Monitor proxmox cert
authoralex <alex@pdp7.net>
Sat, 10 Feb 2024 11:56:39 +0000 (12:56 +0100)
committeralex <alex@pdp7.net>
Sat, 10 Feb 2024 11:56:51 +0000 (12:56 +0100)
personal_infra/puppet/modules/proxmox/manifests/proxy.pp

index a87034c1b394bbf78dbbf0e3bd8da37c1e1fb8fe..c34eeeceb7def467b0d767372053283ac33db5f7 100644 (file)
@@ -49,4 +49,27 @@ class proxmox::proxy ($mail, $base_hostname) {
     ,
     mode => '4755',
   }
+
+  service {'nagios':}
+  package {'nagios':
+    ensure => absent,
+  }
+
+  nagios_service {"$base_hostname-proxmox-cert":
+    use => 'generic-service',
+    service_description => "$base_hostname-proxmox-cert",
+    host_name => $base_hostname,
+    check_command => "check_$base_hostname-proxmox-cert",
+    require => Package['nagios'],
+    notify => Service['nagios'],
+    owner => 'nagios',
+  }
+
+  nagios_command {"check_$base_hostname-proxmox-cert":
+    command_name => "check_$base_hostname-proxmox-cert",
+    command_line => "/usr/lib64/nagios/plugins/check_http -H $base_hostname -C 10,5 -p 8006",
+    require => Package['nagios'],
+    notify => Service['nagios'],
+    owner => 'nagios',
+  }
 }