nagios: Add support for NSCA passive checks.
This commit is contained in:
parent
037fe31dd6
commit
fb89a9506f
3 changed files with 52 additions and 0 deletions
|
@ -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
|
# 'check_hpjd' command definition
|
||||||
define command{
|
define command{
|
||||||
command_name check_hpjd
|
command_name check_hpjd
|
||||||
|
|
|
@ -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.
|
# Define nagios email contact.
|
||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
|
|
|
@ -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,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue