]> Frank Brehm's Git Trees - config/ns1/etc.git/commitdiff
saving uncommitted changes in /etc prior to apt run
authorFrank Brehm <frank@brehm-online.com>
Fri, 5 Jan 2018 12:42:21 +0000 (13:42 +0100)
committerFrank Brehm <frank@brehm-online.com>
Fri, 5 Jan 2018 12:42:21 +0000 (13:42 +0100)
icinga2/conf.d/ns1.conf
icinga2/conf.d/services/dns.conf
icinga2/zones.d/master/hosts.conf
icinga2/zones.d/master/services.conf

index 4cb562dece07f7ce3627950b8f6fb965cfbd2e4e..c79c9b1bae7bee76f070cdd2fce3f644aa6f1433 100644 (file)
@@ -14,6 +14,8 @@ object Host "ns1.uhu-banane.de" {
   vars.is_ns = true
   vars.check_dns_domain = "uhu-banane.de"
 
+  vars.is_mail_sattelite = true
+
   /* Define http vhost attributes for service apply rules in `services.conf`. */
   vars.http_vhosts["http"] = {
     http_uri = "/"
index f28638db94202961397c766f83ffee32d84631c6..01d4e0c34fd23f95110b9b37e35c3ff5f4827987 100644 (file)
@@ -1,7 +1,11 @@
 
 apply Service "proc named" {
   import "generic-service"
-  #host_name = "ns1.uhu-banane.de"
+
+  if ( host.vars.client_endpoint ) {
+    // specify where the check is executed
+    command_endpoint = host.vars.client_endpoint
+  }
 
   check_command = "procs"
   vars.procs_argument = "/usr/sbin/named"
index 33178023c5d91019b463e4387ca8f8e5f4e596aa..f552d8d262fe2f4cea0b2c2e4fd0ef4f0d2f4a9a 100644 (file)
@@ -13,6 +13,8 @@ object Host "ns2.uhu-banane.de" {
     http_uri = "/"
   }
 
+  vars.is_mail_sattelite = true
+
   vars.ping_wrta = 200
   vars.ping_crta = 300
 
@@ -51,6 +53,13 @@ object Host "ns3.uhu-banane.de" {
   vars.is_ns = true
   vars.check_dns_domain = "uhu-banane.de"
 
+  vars.is_mail_sattelite = true
+  vars.is_mta = true
+
+  vars.mailq_warning = 3
+  vars.mailq_critical = 10
+
+
   /* Define http vhost attributes for service apply rules in `services.conf`. */
   vars.http_vhosts["http"] = {
     http_uri = "/"
index e234040014a52c834e247bcc465bfd432c5b7303..636e5ff49c4ff76f07c5631800715d6812924177 100644 (file)
@@ -84,16 +84,55 @@ apply Service "mailq" {
 
   check_command = "mailq"
 
-  //specify where the check is executed
-  command_endpoint = host.vars.client_endpoint
+  if ( host.vars.client_endpoint ) {
+    // specify where the check is executed
+    command_endpoint = host.vars.client_endpoint
+  }
+
+  vars.mailq_warning = 100
+  vars.mailq_critical = 300
+
+  assign where host.vars.is_mta && ! host.vars.is_mail_sattelite
+}
+
+apply Service "mailq" {
+  import "generic-service"
+
+  check_command = "mailq"
+
+  if ( host.vars.client_endpoint ) {
+    // specify where the check is executed
+    command_endpoint = host.vars.client_endpoint
+  }
+
+  vars.mailq_warning = 3
+  vars.mailq_critical = 10
+
+  assign where host.vars.is_mail_sattelite
+}
+
+apply Service "proc postfix" {
+  import "generic-service"
+
+  if ( host.vars.client_endpoint ) {
+    // specify where the check is executed
+    command_endpoint = host.vars.client_endpoint
+  }
+
+  check_command = "procs"
+  vars.procs_argument = "/usr/lib/postfix/sbin/master"
+  vars.procs_ppid = 1
+  vars.procs_warning = "1:1"
+  vars.procs_critical = "1:2"
+  vars.procs_user = "root"
 
-  assign where host.vars.client_endpoint && host.vars.is_mta
+  assign where host.vars.is_mta || host.vars.is_mail_sattelite
 }
 
 apply Service "smtp" {
   import "generic-service"
   check_command = "smtp"
-  assign where host.vars.is_mta
+  assign where host.vars.is_mta && ! host.vars.is_mail_sattelite
 }
 
 apply Service "imap" {