summaryrefslogtreecommitdiff
path: root/manifests/service/imap_login.pp
blob: 25303a3f7900ffa776157c8f525e354c14c5dd79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# a imap login check
define nagios::service::imap_login(
  $username,
  $password,
  $warning   = 5,
  $critical  = 10,
  $host      = $::fqdn,
  $host_name = $::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}",
      host_name     => $host_name,
    }
  }
}