0

Icinga 2 introduced a new format for its object configuration files. Where Icinga 1 e.g. expected

define service {
    name my_service
# ...
}

Icinga 2 now expects

object Service "my_service" {
# ...
}

Is there a reliable automatic way for translating Icinga 1 to Icinga 2 object configuration files both in terms or syntax and semantics (or a way for directly using Icinga 1 object configuration files with Icinga 2)?

Keith
  • 4,627
  • 14
  • 25
rookie09
  • 573
  • 1
  • 5
  • 14

2 Answers2

2

Please don't just port your old config, re-think it and enjoy a clean config.

There is a whole doc guide to help you understand the differences: https://www.icinga.com/docs/icinga2/latest/doc/23-migrating-from-icinga-1x/

What's really different from Icinga 1.x and Nagios:

  • Notifications
  • Command Parametrization
  • Custom vars (now the get used)

Suggestions are always:

  • Start with your hosts
  • Think about templating
  • Add vars to categorize your environment
  • Add common services by apply
  • Add notifications by apply
lazyfrosch
  • 790
  • 4
  • 10
  • The point about rethinking the old config is well taken. I'm actively working on this, but am also interested in a migration tool for the intermediate term. (So of the old configs where auto-generated, so it is "kind of" hard to rethink those.) – rookie09 Nov 27 '17 at 12:14
0

This solution here looks like it could do what you need: https://github.com/palli/icinga2/tree/master/tools/configconvert

  • Thx, I am still surprised though that Netways does not seem to provide anything like that as part of Icinga 2 itself. – rookie09 Nov 27 '17 at 08:11
  • There were two versios of such a migration script, none of them really helped with converting the objects in a reliable way. By "reliable" I refer to a configuration you can take care of, and use the good stuff, as in "apply rules" or conditions, functions, etc. – dnsmichi Mar 22 '18 at 17:48