Migrating from template config files to the Director


I’m looking at moving an Icinga system from hand written configuration files to the Director. Importing hosts/hostgroups/endpoints/zones into the director is fine and not a problem - but I’ve already written ~80 host templates (that are hierarchic) and ~100 services in the Icinga configuration file syntax. Is there any way to import these into host templates and services inside the director?

I can see that commands that I have defined are accessible as external commands.



There is the fileshipper module

I have not used it , but i have been told it can help importing the files to director.
Also if you have all the services in IDO, you can define that as a source and use the Director "import & sync " functionality for that.

1 Like

Thank you for your reply - I have looked into this module, but it doesn’t support Icinga configuration files as far as I can see.

Additionally, the import and sync functionality for CoreAPI does not show host templates or services (I’ve attached a screenshot) - so I don’t think I can use that either?



could this be some help ?

Unfortunately not, as that’s for if you have an existing configuration set up in Director.

I do not know a ready to use way to import them. The only ideas I have:

  • A script that reads your files and then creates the templates via Director api.
  • A converter script that converts your files into the basket format.

There’s the possibility to use the IDO schema as import source and extract the necessary objects. That’s the described here with some references. You cannot import apply rules and other DSL things though.

1 Like

Thanks for the reply - I see that document is referencing Icinga 1.X though - I’ve written these files in the 2.X syntax - would this still apply? Thanks!

Just extract the parts for the IDO import source with the Director. Those are quite new, I’ve added them some weeks ago.


Thank you! I’ll look into this :slight_smile: