nagios: Added support for defining ip address for nagios::host.
This commit is contained in:
parent
29700dace3
commit
e7ae4fb55b
1 changed files with 6 additions and 2 deletions
|
@ -419,6 +419,8 @@ define nagios::contact::pushover($token, $group=["all"],
|
|||
#
|
||||
# $name:
|
||||
# Hostname of target.
|
||||
# $address:
|
||||
# IP address of target. Default is to use hostname.
|
||||
# $group:
|
||||
# Hostgroup name.
|
||||
# $osname:
|
||||
|
@ -428,8 +430,9 @@ define nagios::contact::pushover($token, $group=["all"],
|
|||
# $parent:
|
||||
# Parent hostname.
|
||||
#
|
||||
define nagios::host($group="NONE", $osname="NONE", $osicon="NONE",
|
||||
$confdir=$nagios::common::confdir, $parent=undef) {
|
||||
define nagios::host($address=undef, $group="NONE", $osname="NONE",
|
||||
$osicon="NONE", $confdir=$nagios::common::confdir,
|
||||
$parent=undef) {
|
||||
|
||||
file { "${confdir}/host_${name}.cfg":
|
||||
ensure => present,
|
||||
|
@ -441,6 +444,7 @@ define nagios::host($group="NONE", $osname="NONE", $osicon="NONE",
|
|||
}
|
||||
nagios_host { $name:
|
||||
ensure => present,
|
||||
address => $address,
|
||||
use => "default",
|
||||
target => "${confdir}/host_${name}.cfg",
|
||||
parents => is_array($parent) ? {
|
||||
|
|
Loading…
Add table
Reference in a new issue