Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
414 stars 202 forks source link

"Modify" shows wrong service set origin #2872

Open log1-c opened 6 months ago

log1-c commented 6 months ago

Current Behavior

Example, if set is assigned via dictonary key&value

Service sentienlone_threats is in two service sets.

Set _windows-agent-managedsentinelone: has the following assign statement: assign where host.vars.os_family == "windows" && !(host.vars.tags.ic_service_wts == "yes" || host.vars.tags.ic_service_wts == "true") && ! host.vars.appliance && host.vars.os_layer == "managed"

apply Service "sentinelone_threats" {
    import "sentinelone_threats"

    notes = "SentinelOne Threats sollten durch einen SentinelOne Admin geprüft werden."
    notes_url = "https://wiki.sva.de/pages/viewpage.action?pageId=360766955"
    vars.jira_ticket_priority_warning = 3
    vars.notification_period_warning = "8x5"

    import DirectorOverrideTemplate
}

Set _ic_service_vdsentinelone: has the following assign statement assign where host.vars.os_family == "windows" && host.vars.tags.ic_service_vd_sentinelone == "true"

apply Service "sentinelone_threats" {
    import "sentinelone_threats"

    vars.jira_ticket_priority_warning = 3
    vars.notification_period_warning = "8x5"
    vars.sentinelone_site = "mcms-vd"
    vars.service_owner = "Antivirus"

    import DirectorOverrideTemplate
}

As can be seen, the service differ in small details. The assignment itself works. The services are shown and executed as configured

Service of set_windows-agent-managedsentinelone: image

Service of set _ic_service_vdsentinelone: image

But when clicking "Modify" on the service with origin _ic_service_vdsentinelone the Director shows _windows-agent-managedsentinelone as source set and is even showing the wrong values image

Seems to be related to: https://github.com/Icinga/icingaweb2-module-director/issues/2582

Your Environment

log1-c commented 6 months ago

Looks like this is more of a general problem (with services being named the same at multiple locations?) We recently switched some service from Director-based service sets to Icinga DSL in the config files.

Now the modify of said services show that they still have the origin of the service set, image