https://github.com/bartjanssens92/icinga_config_migration
Python script to convert icinga1.x to icinga2 configuration
https://github.com/bartjanssens92/icinga_config_migration
icinga2-configuration migration python-2 python2
Last synced: about 1 month ago
JSON representation
Python script to convert icinga1.x to icinga2 configuration
- Host: GitHub
- URL: https://github.com/bartjanssens92/icinga_config_migration
- Owner: bartjanssens92
- Created: 2018-02-01T14:41:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T14:44:24.000Z (about 8 years ago)
- Last Synced: 2025-07-11T15:54:00.394Z (9 months ago)
- Topics: icinga2-configuration, migration, python-2, python2
- Language: Python
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Icinga1.x to Icinga2.x configuration
This collection of python scripts can be used to convert Icinga1.x configuration objects into Icinga2 objects.
## Scope
The scope of this project is for the script to be pointed to a Icinga1.x configuration directory and convert it into an Icinga2 configuration.
This means that the generated output of this script must pass the Icinga2 config validator. ( icinga2 deamon --validate ).
It does not mean that the generated config will 100% match the behavior of the old config.
## What works
- Hosts
- HostTemplates
- Hostgroups
- Services
- ServiceTemplates
- Servicegroups
- Users
- Usergroups
- Commands
- Notifications
## What doesn't work (yet)
- Commands assume they are all installed in the same place
- Build_hash is unable to work with multilines
## How to use
```
Usage: ./main.py [OPTIONS]
-h, --help Show help
-w, --write (Depricated) Write the configfiles
-d, --debug Enable debugging ( level 1 )
-o, --object= Generate only the configuration of this object
-I, --input= Use this directoy as input
-O, --output= Which directory to write the configfiles in
Examples:
* Generate configuration for all the objects:
./main.py
* Generate configuration for the host object:
./main.py -o host
* Generate configuration from /tmp/in:
./main.py -I /tmp/in
```
## Todo
- Bugfix: Handle commands that just pass arguments without flags.
- Get the debugging flag working properly.
- See @TODO lines in code