How to create Service Set sync rule

This forum was archived to /woltlab and is now in read-only mode.
  • Icingaweb 2.4.2

    Director 1.4.0


    I have a CSV import source that has two columns that I'd like to use for creating Service Sets via a sync rule. I'm encountering a few problems and not sure if this is a bug or or my lack of understanding of the correct usage. I'm able to import other types of objects without issue.


    Import Source




    Sync rule looks like.




    If object_type is not specified as template, I receive:


    This Sync Rule failed when last checked at 2017-10-22 16:17:09: Exception while syncing Icinga\Module\Director\Objects\IcingaServiceSet act: A Service Set cannot be an object with no related host


    Specifying object_type=host works and I'm able to import; however, subsequent imports fail stating there are duplicates:


    This Sync Rule failed when last checked at 2017-10-22 16:19:07: Exception while syncing Icinga\Module\Director\Objects\IcingaServiceSet act: ServiceSet template "act" already existing in database!


    If a host is specified in the rule instead of object_type = template, the sync completes and subsequent syncs look good.



    However the service set does not show @ /icingaweb2/director/dashboard?name=services#!/icingaweb2/director/services/sets.


    Manually setting the url to /icingaweb2/director/services/sets#!/icingaweb2/director/serviceset?name=act returns:





    This is what it looks like in the database. I noticed a valid Service Set will have a host_id = NULL

    Code
    1. MariaDB [director]> select * from icinga_service_set where object_name = 'act';
    2. +-----+-------------+-------------+---------+-------------+-------------------+
    3. | id  | object_name | object_type | host_id | description | assign_filter     |
    4. +-----+-------------+-------------+---------+-------------+-------------------+
    5. | 949 | act         | object      |   14976 | NULL        | "act"=host.groups |
    6. +-----+-------------+-------------+---------+-------------+-------------------+
    7. 1 row in set (0.00 sec)