From e66581b620d89e81ec02754005f3e3fa2bc603cf Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 25 Oct 2015 16:28:46 +0100 Subject: add an imap_login check --- manifests/service/imap_login.pp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 manifests/service/imap_login.pp (limited to 'manifests/service/imap_login.pp') diff --git a/manifests/service/imap_login.pp b/manifests/service/imap_login.pp new file mode 100644 index 0000000..53c432a --- /dev/null +++ b/manifests/service/imap_login.pp @@ -0,0 +1,20 @@ +# a imap login check +define nagios::service::imap_login( + $username, + $password, + $warning = 5, + $critical = 10, + $host = $::fqdn, + $ensure = 'present', +){ + nagios::service{ + "imap_login_${name}": + ensure => $ensure; + } + + if $ensure != 'absent' { + Nagios::Service["imap_login_${name}"]{ + check_command => "check_imap_login!${host}!${username}!${password}!${warning}!${critical}", + } + } +} -- cgit v1.2.3