Last active
April 22, 2016 05:36
-
-
Save lazyfrosch/5deef1cea45e876ef97d to your computer and use it in GitHub Desktop.
Icinga 2 Puppet module example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ::profile::icinga2_global | |
# endpoints will be generated from zone | |
# no host value, so the agent will connect to the master | |
@@::icinga2::object::zone { $::fqdn: | |
parent => 'master', | |
endpoints => { | |
$::fqdn => { | |
}, | |
}, | |
} | |
# collect myself | |
Icinga2::Object::Zone <<| title == $::fqdn |>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ::icinga2 | |
include ::icinga2::pki::puppet | |
class { 'icinga2::feature::api': | |
accept_commands => true, | |
accept_config => true, | |
manage_zone => false, | |
} | |
::icinga2::object::zone { 'global-templates': | |
global => true, | |
} | |
# this is in all catalogs (without exported resource) | |
::icinga2::object::zone { 'master': | |
endpoints => { | |
'icinga1.example.com' => { | |
host => '1.2.3.4', | |
}, | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ::profile::icinga2_global | |
include ::icinga2::feature::command | |
class { 'icinga2::feature::ido_mysql': | |
user => 'icinga2', | |
password => 'foooobar', | |
} | |
# collect all other zones | |
# note: only agent zones | |
Icinga2::Object::Zone <<| |>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment