nagios: Add support for NSCA passive checks.

This commit is contained in:
Timo Mkinen 2013-10-14 13:27:41 +03:00
parent 037fe31dd6
commit fb89a9506f
3 changed files with 52 additions and 0 deletions

View file

@ -127,6 +127,13 @@ define command{
}
# 'check_dummy' command definition
define command{
command_name check_dummy
command_line $USER1$/check_dummy $ARG1$
}
# 'check_hpjd' command definition
define command{
command_name check_hpjd

View file

@ -291,6 +291,22 @@ class nagios::server inherits nagios::server::manual {
}
# Install nagios NSCA service
#
class nagios::server::nsca {
package { "nsca":
ensure => installed,
}
service { "nsca":
ensure => running,
enable => true,
}
}
# Define nagios email contact.
#
# === Parameters

View file

@ -442,3 +442,32 @@ define nagios::target::nrpe::service($source=undef,
}
# Install NSCA client tools
#
class nagios::target::nsca inherits nagios::target {
package { "nsca-client":
ensure => installed,
}
}
# Register new NSCA service to Nagios server
#
# === Sample usage:
#
# nagios::target::nsca::service { "test": }
#
define nagios::target::nsca::service() {
require nagios::target::nsca
@@nagios::service { "${::homename}_${name}":
command => "check_dummy!0",
description => $name,
host => $::homename,
}
}