-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Correction to give possibility to export service to puppetdb #27
Conversation
FIX: Allow to export services and collect all on master
objects in this schema, if you work with exported resources object_type = Service object_name = users "icinga2::object::${object_type}::${object_name}"
Hey Reamer, I'm not sure I understand everything you did, I'm not sure how renaming the service names can help you. What you probably what you want to do is following:
When the config files on the master are generated and the Icinga2 client is connected properly to the master, Icinga2 will propagate the config to the client. The client will reload automatically when it receives new config. Am I getting this right? Does this help you? |
Hi @bobapple , Best Regards |
To propagate config to the clients you have basically to do the following:
Another option is to send just commands to the client, this is where you would need to set the option accept_commands to true. But this is another scenario. If you are using the Puppet CA, you don't have to bother about a TicketSalt in Icinga2. This is only needed if you want to use the CA generated by Icinga. Hope I could help you! |
One more thing I forgot to mention. |
FWIW, I'm using exported resources for the host to ensure data about the host is able to make it to the server. Then I'm executing checks over ssh. Granted, on the old version of this module. Speed of collection is much less an issue today than it used to be, unless you mean propagation of change. Applies server side mean that you can update services and which nodes those services are checked on without requiring the host to check in at all. |
@Reamer I'm using exported resources (mostly with zones and endpoints though, but also some services and checkcommands) with the current master (and 0.6.0 before) without any problems. I'm supposed to publish my setup as another example but haven't got around to it yet. I hope to be able to do this over the winter holidays though. |
Hi, At the moment I think Icinga2-Director doesn't fit to my environment, because I can't imagine that it get all needed informations from all specific services on my hosts. I see an other problem with director. What happens with a deleted host? Must I do it delete manually or does it the director automatic? @kwisatz @bobapple How big is the performance impact. At the moment I doesn't locate any problem. Greetings Reamer |
From my experience it highly depends on the amount of Icinga objects you want to create with exported resources and on the performance of your PuppetDB. In my case its about 500 hosts and 5.500 services which lead to Puppet runs taking about 10 - 12 minutes on the Icinga master, which is to much in my opinion. Just try it out, switching import mechanisms shouldn't be so hard once you have everything set up Can we close the PR then? |
Yes, we can close the PR. |
I've done some redesign of my icinga2 setup. At the moment I use zones.d with icinga api config sync. IcingaDirector looks nice, but I don't want this component in my current setup. Let me explain, why I need this changes to work with exported resources. In my profile I have this puppet code to export a service.
The FQDN in the object name is needed, because all exported resources need an unique name. Without the additional parameter "service_name", I am not able to give service objects a nice name, like "swap","procs", etc. In commit 7266dfc we have nearly the same situation. Because I collect a lot of services with the same name, I need a unique identifier. My solution: I use the unique name from my unique service object. If anything is not clear, let me know. |
Alright, I get your point. But why use |
Hi @bobapple,
I hope everything is clear, if not let me know. Best Regards |
We discussed this also with @lbetz in person. He will review and merge your commits. Thanks for your contribution 👍 |
see also https://dev.icinga.com/issues/13767 |
Hi,
maybe I doesn't understand this module, but I was not able to export a icinga::object::service resource to my puppetdb. In icinga2 you must create a service object on agent and on master right?
I have something like this in my own puppet manifest
On Icinga Master server
After my first commit I had problem with concat::fragment resource key name, I changed a to title, because I think is more unique when you collect your Resources.
Maybe I do something totally wrong, then let me know how I must configure icinga2 with Puppet.
Best Regards
Reamer