Can I start by saying how much I love the Icinga Director!!
I have a query regarding director deployment that I am hoping will initiate a useful conversation for the community.
My company has recently begun our journey in migrating our monitoring to Icinga2, we deploy everything through automated tools (Puppet, Ansible etc).
In our initial deployment efforts, I have been resorting to a MySQL dump/restore (of a skeletal deployment with no hosts defined) in order to deploy a working hierarchy of Fields, Apply-Services, Templates, etc.
This was fine for initial deployment but really ties our hands when it comes to revision control (we need to slowly enhance the service-monitoring options through releases).
I have been developing some python scripts in order to deploy everything from static YAML files.
Some example YAML (one example of each type):
- caption: 'SSH: The command you want to run by ssh'
- datatype: Icinga\Module\Director\DataType\DataTypeString
- - entry: 'CentOS'
- value: img/icons/centos.png
- format: string
- - entry: 'RedHat'
- value: img/icons/redhat.png
- format: string
- - host_emc_luns
- - host_emc_ports
- - host_emc_storage_pools
- - host_emc_service_processors
- - by_ssh_command
- - by_ssh_logname
I am hitting some limitations of the API and so have resorted to building some relationships in MySQL (like the field relationships in the icinga_host_field table.).
My main queries are:
- What are others using for initial deployments of director? Hand-crafting director implementations for each implementation would be very time-consuming. I imagine I am not the first person to come across this task.
- Where would my efforts best be directed? Should we be focusing our efforts on the "icingacli director" functionality? The icingacli CLI seems to be lagging behind the REST API in functionality (like you can't delete services from the CLI).
- Is there a better way of exporting a working template->apply->field hierarchy from a template environment?
I am ready to assist with some programming effort (although I'm only really effective in Python) but I don't want to duplicate effort if there is already work underway to implement this.