On Mon, Feb 9, 2015 at 10:55 AM, ProfHase <
profh...@gmail.com> wrote:
> @Michael Peters:
> I am using monit for monitoring. And depending on machine there are
> completely different services to monitor. I could also do multiple roles
> like 'monit_webservice' , 'monit_db', 'monit_application_a',
> 'monit_application_b' for just one configuration file. .... this would mean
> a certain amount of duplication and it seems odd in terms of clarity. Also
> some applications do not support a 'conf.d/' style. In my actual setup i can
> see on a per-machine basis which services are monitored.
You don't need a whole role for each config file. If you have a
webservice role, have that role depend on the monit role. The monit
role will make sure that monit is installed and configured globally.
And then the webservice role would add the extra monit configuration
file that is specific for webservices. And you can repeat this same
pattern for other things like rsyslog, statsd, collectd, etc.
And you're right that some applications don't do the conf.d/ pattern
so you need to do extra work to get around that. But still in those
cases you get around that in role-specific ways, not host specific
ways. I still think that if you need host specific files and
templates, something is probably wrong.