Skip to content

Instantly share code, notes, and snippets.

@MelanieGault
Last active August 29, 2015 14:05
Show Gist options
  • Save MelanieGault/9bfde4e1eff9b632d667 to your computer and use it in GitHub Desktop.
Save MelanieGault/9bfde4e1eff9b632d667 to your computer and use it in GitHub Desktop.
puppet icinga2 : to add to server profile definition (basic)
icinga2::object::hostgroup { 'foo':
groups => ['foo2'],
assign_where => 'match(\"*bar*\", host.name)',
}
icinga2::object::servicegroup { 'foo':
groups => ['foo2'],
assign_where => 'match(\"*bar*\", service.name)',
}
# every other object type you would like
Icinga2::Object::Host <<| |>>
Icinga2::Object::Service <<| |>>
Icinga2::Object::Servicegroup <<| |>>
Icinga2::Object::Hostgroup <<| |>>
Icinga2::Object::User <<| |>>
Icinga2::Object::Apply_service_to_host <<| |>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment