-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hostgroup assignments inherited from hosttemplates overwrite each other depending on inheritance sequence #824
Comments
This is also happening for groups at objects or I assume for all attributes of type array. I would like this to work in the way:
|
What will happen to attributes inherited from different templates? Do they build up a new array by default that is shown to the user? Or can I select which one to use? I'm trying to imagine how you want to realize this. |
Hey guys, any update on this? I am facing the same problem (icinga 2.8.1-1) and latest director module (master). Fabian |
Hello Thomas, |
Hallo Team, Thanks! |
Any updates on this? It is now two years since this issue was opened. |
BUMPING this as well. Surprised to find out it wasn't the default behavior. |
Hey @Thomas-Gelf, can you please take a look into this issue? |
I am facing the same issue. Would love to get some feedback if this will be fixed/changed. I don't think configuring all Hostgroups in all inherited Groups is the goal of director/inheriting. |
Hello @Thomas-Gelf, what can i do to help you to fix this? |
Hi @Thomas-Gelf, I've had a go a adding this feature by adding a property operator to the IcingaObjectGroups class. I haven't been able to quite get it working. I've got a working UI, Additional destination fields now has under Special Properties sync rule stored in the db
and working config getting written if I set the default value for the class property operator to what I require
Incomplete I have a forked branch here and can create a pull request if required. The diff is below if you'd prefer that
I'll note that using group add as the default is incredibly useful, particularly with automation. I agree that the default shouldn't change though which is why I've made the attempt to add this feature. If I'm on the right track and you can point me in the right direction that would be great, if I have taken the wrong approach but you can see a better way to implement this I'm happy to listen to any suggestions and have a crack at them. Thanks, Matt |
Isn't this related to #344 ? |
Add default value 'assign' for default group behaviour which matches group behaviour. Add logic to IcingaObjectGroups so the class initalizes with the global group behaviour and sets the group operator based on the class operator. Partial Fix for Icinga#344, Icinga#636, Icinga#824, Icinga#2273
We have defined a tree of hosttemplates to which we assign the services that are needed for kind of host. To some of those templates we have assigned also hostgroups.
Example: Our AFS database servers and fileservers
Hosttemplates
|
SERVICE (dummy template)
|
afs (Import: SERVICE, Services: BOS)
|
afsdb (Import: afs, Groups: SYS AFSDB, Services: (BOS from afs) BUSERVER, KASERVER, PTSERVER, VLSERVER)
|
afsfs (Import: afs, Groups: SYS AFSFS, Services: (BOS from afs) AFS Space, RXDEBUG)
Preview gives:
template Host "SERVICE" {
}
template Host "afsdb" {
import "afs"
}
template Host "afsfs" {
import "afs"
}
object HostGroup "SYS AFSDB" {
display_name = "SYS AFS DB Server"
}
object HostGroup "SYS AFSFS" {
display_name = "SYS AFS Fileserver"
}
We have some hosts that are both: AFS database server and fileserver
Host afs.thp.uni-koeln.de
object Host "afs.thp.uni-koeln.de" {
import "linux-rhel-sys"
import "afsdb"
import "afsfs"
}
Problem:
Depending on which template comes last in the list of imports, the host is assigned only to the last inherited hostgroup.
Sequence "afsdb afsfs" results in hostgroup "SYS AFSFS", Sequence "afsfs afsdb" results in hostgroup "SYS AFSDB".
To assign hosts like this to more than one hostgroup, I have to edit the group entry of each host manually. Same seems to happen with servicegroups.
In nagios/icinga 1.x it was possible to extend the list of hostgroups by using something like "hostgroups=+afsdb".
The text was updated successfully, but these errors were encountered: