Conversation
monitrc is also updated to look like the packaged one
|
hey there, sorry for the delay, currently working on merging things (unfortunately it's not going in clean) I have a question, can you explain what you mean by the comment in libraries/monitrc.rb: #this should be "monit/#{name}.conf.erb" or "#{name}.monit.conf.erb" to not conflict with other conf files I'm unclear on the "monit/#{name}.conf.erb" part. Does that mean it would look for the template inside the monit cookbook templates dir with a name of "#{name}.conf.erb"? |
|
Hi, I mean that monit configuration files for services should be in the local cookbook but in a 'monit/' subdirectory, in 'templates/default/monit/' to be precise. For example on debian memcache uses a memcache.conf. Meaning the template is 'templates/default/memcache.conf.erb.' If I want to create a monit check I have to name it 'templates/default/memcache.monit.conf.erb' and the target file name will be memcache.monit.conf I think having the monit template as 'templates/default/monit/memcache.conf.erb' is cleaner. I do the same for ganglia, all my ganglia plugins are in templates/default/ganglia, same for nagios nrpe, etc. I find my cookbooks more maintainable in the long run. Thanks |
|
As I'm merging I'm noticing that things are not going to stay backwards compatible anyway since I also merged in a patch that moves the LWRP from a library to a definition. Therefore, I'll try to adopt the subdir convention as the next release will break backwards compatibility anyway. |
|
@apsoto Do we want to start a new branch for the next release that will not provide backwards compatibility? I'm not sure what to do with PRs like this at this point. |
|
good idea, go for it. If you can release a version that's still backwards compatible, I say release it as 1.0, then next one can be 2.0. If you have time, create 1.X and 2.X series branches. Thanks |
|
👍 I just started implementing this myself only to discover this pull request. This cookbook doesn't work correctly on redhat family distros when running on master. |
|
I'm strapped for time, if anyone wants to step up and handle this I can add as a collaborator. |
dadcde5 to
fa5f017
Compare
|
I think this would be a good addition. @gilles - if you're still interested can you rebase this against the recent changes and I'll help merge |
ffa7522 to
ac3793f
Compare
Hi,
I have updated the cookbook to be multi platform, I also updated the monitrc files to look like the packaged one.
I've also made a comment in the definition to namespace the source file path. The version I use here is of the form "monit/#{name}.conf.erb".
Thanks for considering
--Gilles