nagios: Added TCP connect check support.

This commit is contained in:
Timo Mkinen 2013-05-07 20:52:04 +03:00
parent de46a6c4a4
commit e784e03300

View file

@ -100,6 +100,42 @@ class nagios::target::smtp inherits nagios::target {
}
# Configure tcp connect service target.
#
# === Parameters
#
# $name:
# Short name
# $port:
# Port where to connect
# $description:
# Description of service. Defaults to $name
#
# === Sample usage
#
# nagios::target::tcp { "git":
# port => "9418",
# description => "GIT",
# }
#
define nagios::target::tcp($port, $description=undef) {
include nagios::target
if ! $description {
$description = $name
}
@@nagios::service { "${::homename}_${name}":
command => "check_tcp!${port}",
description => $description,
group => $nagios::target::group,
host => $::homename,
}
}
# Configure nagios nrpe target.
#
class nagios::target::nrpe inherits nagios::target {