From d6e394443554fd987101edeacec8c37853fdfdc8 Mon Sep 17 00:00:00 2001 From: Tobias Wiese Date: Thu, 14 May 2020 23:16:48 +0200 Subject: hosts/keen-morse: Monitor the mailserver Add monitoring to the mailserver. Alos adds services for the mailq, smtp and imap Signed-off-by: Tobias Wiese --- zones.d/master/services.conf | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'zones.d/master') diff --git a/zones.d/master/services.conf b/zones.d/master/services.conf index fc362d8..9a86a10 100644 --- a/zones.d/master/services.conf +++ b/zones.d/master/services.conf @@ -84,3 +84,51 @@ apply Service "https-cert-" for (http_vhost => config in host.vars.http_vhosts) vars.http_certificate = "25,10" } + +apply Service "imap" { + import "generic-network-service" + + check_command = "imap" + + vars += { + imap_warning = 0.1s + imap_critical = 0.2s + } + + assign where host.vars.mailserver +} + +template Service "smtp" { + import "generic-network-service" + + check_command = "smtp" + + vars += { + smtp_starttls = true + smtp_certificate_age = 10 + smtp_warning = 0.1s + smtp_critical = 0.2s + } +} + +apply Service "smtp-insecure" { + import "smtp" + + vars.smtp_starttls = false + + assign where host.vars.mailserver +} + +apply Service "smtp-secure" { + import "smtp" + + assign where host.vars.mailserver +} + +apply Service "submission" { + import "smtp" + + vars.smtp_port = 587 + + assign where host.vars.mailserver +} -- cgit v1.2.3