]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
pixelpark - dev-monitoring: check_disk_by_ssh
authorThomas Dalichow <thomas.dalichow@publicispixelpark.de>
Tue, 15 May 2018 15:47:15 +0000 (17:47 +0200)
committerThomas Dalichow <thomas.dalichow@publicispixelpark.de>
Tue, 15 May 2018 15:47:35 +0000 (17:47 +0200)
customer/pixelpark/dev-monitoring.pixelpark.com.yaml

index f150fd091f2ca41b72486eb7227ca88a3600402d..c2a88521994ab81385b34ea2ff7ada8d481c889d 100644 (file)
@@ -97,12 +97,18 @@ infra::profile::icinga2::object::service:
     max_check_attempts: '5'
     check_interval: '1m'
     retry_interval: '30s'
-    check_command: 'hostalive'
     vars:
       notification:
         mail:
           groups:
             - 'icingaadmins'
+  'check-by-ssh-service':
+    target: '/etc/icinga2/conf.d/service-templates.conf'
+    template: true
+    check_command: 'by_ssh'
+    vars:
+      'original_check_command': check_command
+    check_command: 'by_ssh'
   'active-directory':
     target: '/etc/icinga2/conf.d/services.conf'
     import:
@@ -134,7 +140,7 @@ infra::profile::icinga2::object::service:
     assign:
       - 'host.address && (host.name == dev-monitoring-client.pixelpark.com || host.name == dev-monitoring.pixelpark.com)'
     notes: 'This is a load check'
-  'disk':
+  'linux-disk':
     target: '/etc/icinga2/conf.d/default-services.conf'
     import:
       - 'generic-service'
@@ -145,8 +151,24 @@ infra::profile::icinga2::object::service:
     command_endpoint: 'host.name'
     apply: true
     assign:
-      - 'host.address && (host.name == dev-monitoring-client.pixelpark.com || host.name == dev-monitoring.pixelpark.com)'
+      - 'host.address && (host.name == dev-monitoring-client.pixelpark.com || host.name == dev-monitoring.pixelpark.com) && host.vars.os == Linux'
     notes: 'This checks whether there is enough local disk space left'
+  'solaris-disk':
+    target: '/etc/icinga2/conf.d/default-services.conf'
+    import:
+      - 'generic-service'
+      - 'check-by-ssh-service'
+    check_command: 'disk'
+    vars:
+      'warning': 85
+      'critical': 95
+      'by_ssh_command': '{{ get_check_command("disk").command }}'
+      'by_ssh_arguments': '{{ get_check_command("disk").arguments }}'
+    command_endpoint: 'host.name'
+    apply: true
+    assign:
+      - 'host.address && (host.name == aurora.pixelpark.net) && host.vars.os == Solaris'
+    notes: 'This checks whether there is enough local disk space left (check runs via SSH)'
   'systemd-status':
     target: '/etc/icinga2/conf.d/default-services.conf'
     import: