Skip to content

Instantly share code, notes, and snippets.

@nickchappell
Created July 10, 2014 05:24
Show Gist options
  • Save nickchappell/0ae5c481cf9c4d324102 to your computer and use it in GitHub Desktop.
Save nickchappell/0ae5c481cf9c4d324102 to your computer and use it in GitHub Desktop.
Icinga 2 module host defined type example
#On the client machines being monitored:
@@icinga2::objects::host { $::fqdn:
display_name => $::fqdn,
ipv4_address => $::ipaddress_eth1,
target_dir => '/etc/icinga2/conf.d/hosts',
target_file_name => "${fqdn}.conf"
}
#on the Icinga 2 monitoring server:
#Collect all @@icinga2::objects::host resources from PuppetDB that were exported by other machines:
Icinga2::Objects::Host <<| |>> { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment