monit icon indicating copy to clipboard operation
monit copied to clipboard

Multi platform

Open gilles opened this issue 12 years ago • 8 comments

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

gilles avatar Mar 28 '12 17:03 gilles

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"?

apsoto avatar May 17 '12 04:05 apsoto

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

gilles avatar May 17 '12 17:05 gilles

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 avatar May 17 '12 17:05 apsoto

@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.

freerobby avatar Oct 05 '12 18:10 freerobby

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

apsoto avatar Oct 05 '12 20:10 apsoto

:+1:

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.

ryansch avatar Jan 25 '13 21:01 ryansch

I'm strapped for time, if anyone wants to step up and handle this I can add as a collaborator.

apsoto avatar Jan 29 '13 04:01 apsoto

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

yourabi avatar Sep 10 '14 04:09 yourabi