Skip to content
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 #13335] Modify Hosts using multiple Import sources/Sync rules #627

Closed
icinga-migration opened this issue Nov 27, 2016 · 2 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13335

Created by friesoft on 2016-11-27 23:15:01 +00:00

Assignee: friesoft
Status: Feedback
Target Version: (none)
Last Update: 2016-11-27 23:32:31 +00:00 (in Redmine)


We have one MySQL database containing all our hosts and services. We want to have all the information what to monitor in the Host configuration - this allows us to see everything in one place and apply services using "apply for" rules making the process of adding new services really clean (just a one liner in the custom var).

As it is currently not possible to have multiple Import sources modifying the same hosts we are facing the problem that the SQL statement for importing all hosts including services is already hundreds of lines long, using tons of subselects and therefore isn't really readable/maintainable anymore.

Our preferred way would be multiple import sources/sync rules:

  • Import Source 1: Import Hosts (just the host with address, description, groups, ...)
  • Import Source 2: Apache Instances (modifies the host by adding/modifying the custom var containing all apache instances)
  • Import Source 3: Tomcat Instances (modifies the host by adding/modifying the custom var containing all tomcat instances)

If this is already possible I must apologize but then it wasn't really obvious for me.
Last time I tried the second import source (+sync) removed either all the hosts imported using import source 1 or those manually created.

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-27 23:32:31 +00:00

  • Status changed from New to Feedback
  • Assigned to set to friesoft

My personal preference would be to fix this in your SQL query, as that would waste less resource. However, working with multiple sources should work fine. Your problem is that you created multiple Sync rules. Please try to combine your three import sources in a single Sync rule and let me know whether this solved your issue.

Cheers,
Thomas

@friesoft
Copy link
Contributor

Using multiple import sources with one sync rule works for me :) This can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants