example42/puppet-icinga — pull request #29 by Freeaqingme (2013-07-15 10:58:42+00:00)
Title: Destilled class ::target into object ::object for NSCA support

As discussed per mail I've been busy setting up NSCA (I've got a separate NSCA-ng project). In order to set this up, I wanted to define multiple targets. Unfortunately, icinga::target was a class and not a defined type, so I couldn't use that strategy as-is. To accomplish that I created a defined type (icinga::object) that I'm now using in icinga::target. Also, many variables were derived from icinga::target, I now placed those in icinga::object::params.

It still is a WIP. Could you please review it @example42 to see if you agree with the approach chosen, if you're able to spot any unacceptable breaks in BC, and if you've any other suggestions.

My approach allows me to use the following now:
icinga::object { 'relayserver':
hostname => $::fqdn,
magic_tag => $::fqdn,
}

icinga::object { 'centralmonitoringserver':
host_template => 'generic-relayed-host',
magic_tag => '',
}