Difficulties in importing data

Hello,
Im an Icinga newbie and would like some help to figure out how to import hosts list from an older installation.
My setup:
Icinga 2.11.4 + Director 1.9.1, running on Docker.

I was able to export/import configuration bucket to the new server, however it does not include any “hosts”.
The other method I attempted was using “fileshipper”. I’ve installed and enabled the module, however when trying to import source using it, Im facing the following error:
“The file “/etc/icingaweb2/modules/fileshipper/imports.ini” does not exist or is not accessible”
Well, this file is indeed not present. Should it be added manually?

Other method I tried was to dumping / importing SQL DB’s, but due to large version discrepancy, the database is not working was expected.

Im looking for a solution for a week now, and would like an advice on how it can be done.
Thank you very much in advance

Is the old icinga instance still available?
You can use the icinga director Import Source feature to import from director objects by adding the old director db as a resource in icingaweb2 and import the objects
Screenshot 2023-04-02 at 10.40.52

You can also talk to the old director via RESTApi and fetch the objects.
Screenshot 2023-04-02 at 10.41.15

according to fileshipper docs:

Initially, this list is empty. The module doesn’t allow you to freely choose any file on your system. You have to provide a safe set of base directories in your fileshipper 's module config directory, usually /etc/icingaweb2/modules/fileshipper . There you need to create an imports.ini that could look as follows:
[A bunch of files]
basedir = “/var/cache/various_files”

[Puppet facts store (YAML directory)]
basedir = “/var/cache/sample-nodes”

but you still need a file with your hosts and services

Hi,
thank you for the reply.
I’ve just set up the " imports.ini" as you’ve recommended, and run “import trigger” which was finished successfully, however there is still no “hosts” or any other data.
The mysql dump is present on the server and I attempted to use it as the data source.

Please view the screenshots below



I3

Is there any other method to import the data?
Thank you so much

It a little bit misleading, please reread the director documentation.
An import source doesn’t change the director configuration, it loads the data into a “store”.
From this store it can be written to director via “sync rule”

1 Like