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
[dev.icinga.com #11332] Support dependencies #132
Comments
Updated by mdetrano on 2016-06-10 19:59:10 +00:00 Has work started or is it planned for implementing dependency configuration in Director? If not, would you like some help? Seems to me they would follow the same general pattern for Services or Notification objects. For us, this is an important feature (especially for implementing host-reachability logic). |
Updated by tgelf on 2016-06-17 23:04:20 +00:00 Not scheduled yet, I'd of course love to see this implemented. Shouldn't be that complicated, and yes, it should basically follow the existing patterns. In case you want to give it a try, help is always appreciated. Otherwise, it will for sure arrive sooner or later - it's just a matter of priorities. Best, |
Updated by mdetrano on 2016-06-21 22:50:08 +00:00 I have got much of the feature working in a local git branch (a good start,anyhow). If my github user (mdetrano or marc@gridshield.net) can get access to the remote I'd like to push the branch up for further review, testing, and merge if it looks ok. Works a lot like "Services", except Dependencies can themselves be added to a service (works for service on host, service on host template, a service template, or a service apply rule). Dependency templates and apply rules can also be created independent of specific host or service objects (as is done with Services). |
Updated by tgelf on 2016-06-23 08:26:17 +00:00 Just fork Director on Github (single click), that gives you a full clone with all permissions in your namespace. Then push your changes to a dedicated branch there and send me a pull request. That's the easiest way to review them together I guess. Thanks, |
Updated by tgelf on 2016-08-24 14:41:44 +00:00
|
Updated by dgoetz on 2016-09-05 09:04:39 +00:00 While it is easy to get them deployed in addtion to the Director provided config, adding them would be great. ;-) |
Updated by tgelf on 2016-10-24 03:58:12 +00:00
|
Updated by tgelf on 2016-11-03 12:43:21 +00:00
|
Updated by tgelf on 2016-11-30 09:00:58 +00:00
|
any news on this? |
I would also appreciate news on this, we need this feature... |
Ping @Thomas-Gelf and @mdetrano |
For us, this is a necessary condition, please increase the priority |
The latest update to the pull request should allow that branch to merge cleanly with latest Director. ..for anyone who'd like to test it out. As for the issue of it being slow...I've used this in a ~1500 host system and it seems ok for a system of that size. Ultimately, a new form component may be needed to more dynamically allow for host/service lookups so that things remain smooth on huge systems as well. |
@mdetrano Hi, if you don't mind, could you please tell me how to test the dependencies in Director? I actually downloaded this - https://github.com/Icinga/icingaweb2-module-director/tree/5e8361d55b4c0d1e7a049a7251d7c2c6eda23d04 and checked the icingaweb2 interface but looks the same. I thought maybe some menus would be added into director. I could see dependency option has been added in icingacli director command though. I am actually a total novice with this GitHub so need a bit of help regarding test. If you could show me how to a bit more, I'd really appreciate it. Thanks again. |
On 06/01/2017 03:17 PM, eoinkim wrote:
@mdetrano <https://github.com/mdetrano> Hi, if you don't mind, could
you please tell me how to test the dependencies in Director? I
actually downloaded this -
https://github.com/Icinga/icingaweb2-module-director/tree/5e8361d55b4c0d1e7a049a7251d7c2c6eda23d04
and checked the icingaweb2 interface but looks the same. I thought
maybe some menus would be added into director. I could see dependency
option has been added in icingacli director command though.
I am actually a total novice with this GitHub so need a bit of help
regarding test. If you could show me how to a bit more, I'd really
appreciate it. Thanks again.
I am not sure why "Dependencies" didn't show up in your Director (on the
initial dashboard screen when you open Director), but in any case I'd
usually do something like the following steps to setup Director and test
the branch:
cd /usr/share/icingaweb2/modules
git clone https://github.com/Icinga/icingaweb2-module-director.git director
cd director/
git remote add mdetrano
https://github.com/mdetrano/icingaweb2-module-director.git
git fetch mdetrano
git merge Feature_11332_Support_Dependencies_20161118
... and it may ask you to setup the user name and email information
before actually doing the merge step.
Support for the database changes is only present in the mysql version of
the schema script:
/usr/share/icingaweb2/modules/director/schema/mysql.sql. If you are
having issues you may want to verify that the tables icinga_dependency ,
icinga_dependency_inheritance , and icinga_dependency_states_set have
been created in your Director DB. The "upgrade_dependencies.sql" file
under mysql-migrations may help get those added if they are not yet there.
Thanks for interest in having a look at this implementation.
Marc
|
@mdetrano Thanks a lot, I'll have a try again. Cheers. |
@mdetrano Hi, I just made a change as you said and I can see the new menu in director. Really appreciate it. However, when I test the dependency it doesn't look working well. I expected the notification for child host should not arrive when parent host is down. But I am receiving notifications for both hosts. I made dependency configuration like below: zones.d/director-global/dependency_apply.conf And I created a test host with the following setting: zones.d/master/hosts.conf If I am missing something, could you please advise regarding this? Sorry for bothering you. |
@eoinkim , One way to verify the dependency was actually created is to use the commandline interface of icinga2: Example: icinga2 object list --type dependency --name "host-dependency" should show your dependency (after you deploy it from Director). If that dependency is in fact there, and has the fields as configured...then the problem you are having is an Icinga issue. If its not there, then something strange is happening and the object is not making it from Director to you configuration. |
@mdetrano Thanks. I was considering using director web interface only. But I found that using command is a bit necessary. Yes, I checked if the dependency shows up via the command line and it does. Thanks again. Cheers. |
i am trying Dependencies but i am not getting how this is working. object Dependency "host-dependency" { |
@odrino14 Hi mate, I think you need apply rule to see the effect. Have you created any apply rules? |
Hi @eoinkim, |
@odrino14 , the field parent_service should appear on the form after selecting a parent_host (the list is populated after the system knows which host to list services for). Did this not happen? |
@mdetrano , no it is not working. i just have parent_host even if i choose one. |
@odrino14 I am not sure why the services won't display..how do you define services for the hosts? directly, via a host template, or via Apply rules (apply rule generated services may not be presented in the list). |
@mdetrano , Btw, I hope that your #39 will be accepted soon. |
@mdetrano , |
@mdetrano I tried following these instructions but I don't see any new menu item, and actually lost the first row of icons on the Director dashboard. My director DB is missing the tables too. I switched to the latest from icinga/icingaweb2-module-director after seeing #28 and #39 but still no dependencies, even after trying the upgrades from mysql-migrations. |
It's possible there have been some updates upstream and that branch is no longer merge-able. I'll try to check on it soon. Another issue I can see cropping up in the discussion here...linking services. Hosts are so much easier because you know you have a host-name to work with...services can be setup in so many different ways, and when it comes to apply rules, and especially apply-for rules, determining the service name may not be practical from the Director database. It may be better to lose the fixed-link back to a configured service and simply make the service an editable field. Or , I could allow some combination of bother. |
@mdetrano Aren't the services already linked to their hosts? |
Since there had been quite a bit of updates upstream, I created a completely updated branch and submitted a new pull request for this feature. I was able to handle some of the issues that have been brought up here...faster form loads, using services that are "applied" to a host for child or parent relations, and using the "same host" ability for Dependencies setup via Apply rules. Again, for anyone who wants to test it out, here is an example of how to merge in the changes: cd /usr/share/icingaweb2/modules There are a couple of sql scripts to manually update the database (mysql only...if someone can port this to Postgresql, that would be great). schema/mysql-migrations/upgrade_dependencies.sql |
This has been merged to master, still flagged "experimental". For those who already have been experimenting with this branch: please drop dependency-related tables before applying the new migrations. They slightly differ from the former feature branch. |
@mdetrano: thanks a lot for the hard work. It would be great if you could check whether everything still works as expected in the current master. I disabled "single dependency objects" for now, only templates and apply rules are allowed - but that should suffice for most users. Some constraints are now "hard", you are no longer allowed to remove parents being used by dependency rules. Deleting childs is fine and will also silently drop related dependencies. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/11332
Created by tgelf on 2016-03-08 16:24:01 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-30 09:00:58 +00:00 (in Redmine)
They have been forgotten...
Changesets
2016-12-29 22:07:12 +00:00 by mdetrano cb6f04c
Relations:
The text was updated successfully, but these errors were encountered: