Changes to munin-recipe

Hi all,

I do have a small but interesting patch here to ease the transition
from non-chef to chef controlled environments for munin:
Its nice that munin::client finds (and allows) munin-servers in the
same environment. But that only works for munin-servers that are
already chef-managed. And it only works in the same environment.
The attached patch adds an attribute to allow more servers to access
munin::client.

Is this useful to anyone of you?

How do I proceed from here to get it included in the official
cookbooks? I already had my boss sign the ccla, I do have an account
for the bug-tracker. (One small catch: We use svn and I can’t get my
head around to working with git, so pull-requests are out for now.)

Have fun,

Arnold

On Tue, Dec 18, 2012 at 1:39 PM, Arnold Krille arnold@arnoldarts.de wrote:

How do I proceed from here to get it included in the official
cookbooks? I already had my boss sign the ccla, I do have an account
for the bug-tracker. (One small catch: We use svn and I can't get my
head around to working with git, so pull-requests are out for now.)

Somebody has to say it, so I will: learn git. You'll thank us for it.

On Tue, 18 Dec 2012 13:58:27 +0100 Andrea Campi
andrea.campi@zephirworks.com wrote:

On Tue, Dec 18, 2012 at 1:39 PM, Arnold Krille arnold@arnoldarts.de
wrote:

How do I proceed from here to get it included in the official
cookbooks? I already had my boss sign the ccla, I do have an account
for the bug-tracker. (One small catch: We use svn and I can't get my
head around to working with git, so pull-requests are out for now.)
Somebody has to say it, so I will: learn git. You'll thank us for it.

Next you will also tell me to switch my OS to emacs;-)

Sorry, I am busy learning and mastering a lot of stuff (including
mercurial), git is not one of this. Don't try to pull me into that
cult...

Have fun,

Arnold

On Tue, Dec 18, 2012 at 2:16 PM, Arnold Krille arnold@arnoldarts.de wrote:

On Tue, 18 Dec 2012 13:58:27 +0100 Andrea Campi
andrea.campi@zephirworks.com wrote:

On Tue, Dec 18, 2012 at 1:39 PM, Arnold Krille arnold@arnoldarts.de
wrote:

How do I proceed from here to get it included in the official
cookbooks? I already had my boss sign the ccla, I do have an account
for the bug-tracker. (One small catch: We use svn and I can't get my
head around to working with git, so pull-requests are out for now.)
Somebody has to say it, so I will: learn git. You'll thank us for it.

Next you will also tell me to switch my OS to emacs;-)

Sorry, I am busy learning and mastering a lot of stuff (including
mercurial), git is not one of this. Don't try to pull me into that
cult...

I'm not going to, religion is not my thing whether it's tech tools or other…

But staying in topic: without git you will have to find a "sponsor" who can
take care of turning your patches into proper commits and submitting a pull
request for you.

Another option would be for you to fork the project on github (via web),
then hit the "Edit" button and copy and paste your changes.
Not my idea of fun, but hey, you asked for it :wink:

Just to say thanks for this patch I also end up having to support this type
of environment but didn't have time to do it properly so only hacked the
templates to include the existing non-chef munin servers this is much nicer.

thanks
Mat

On 18 December 2012 12:39, Arnold Krille arnold@arnoldarts.de wrote:

Hi all,

I do have a small but interesting patch here to ease the transition
from non-chef to chef controlled environments for munin:
Its nice that munin::client finds (and allows) munin-servers in the
same environment. But that only works for munin-servers that are
already chef-managed. And it only works in the same environment.
The attached patch adds an attribute to allow more servers to access
munin::client.

Is this useful to anyone of you?

How do I proceed from here to get it included in the official
cookbooks? I already had my boss sign the ccla, I do have an account
for the bug-tracker. (One small catch: We use svn and I can't get my
head around to working with git, so pull-requests are out for now.)

Have fun,

Arnold

On Tuesday, December 18, 2012 at 5:24 AM, Andrea Campi wrote:

On Tue, Dec 18, 2012 at 2:16 PM, Arnold Krille <arnold@arnoldarts.de (mailto:arnold@arnoldarts.de)> wrote:

On Tue, 18 Dec 2012 13:58:27 +0100 Andrea Campi
<andrea.campi@zephirworks.com (mailto:andrea.campi@zephirworks.com)> wrote:

On Tue, Dec 18, 2012 at 1:39 PM, Arnold Krille <arnold@arnoldarts.de (mailto:arnold@arnoldarts.de)>
wrote:

How do I proceed from here to get it included in the official
cookbooks? I already had my boss sign the ccla, I do have an account
for the bug-tracker. (One small catch: We use svn and I can't get my
head around to working with git, so pull-requests are out for now.)
Somebody has to say it, so I will: learn git. You'll thank us for it.

Next you will also tell me to switch my OS to emacs;-)

Sorry, I am busy learning and mastering a lot of stuff (including
mercurial), git is not one of this. Don't try to pull me into that
cult...

I'm not going to, religion is not my thing whether it's tech tools or other…

But staying in topic: without git you will have to find a "sponsor" who can take care of turning your patches into proper commits and submitting a pull request for you.

Another option would be for you to fork the project on github (via web), then hit the "Edit" button and copy and paste your changes.
Not my idea of fun, but hey, you asked for it :wink:

For the record, we accept patches attached to tickets in Jira (tickets.opscode.com), but pull requests are much easier to work with.

--
Daniel DeLeo

On Tuesday 18 December 2012 14:25:26 Mat Davies wrote:

Just to say thanks for this patch I also end up having to support this type
of environment but didn't have time to do it properly so only hacked the
templates to include the existing non-chef munin servers this is much nicer.

I also need this for the munin-clients at the customers location which should
also accept connections from our main-munin-server.

The patch extending munin::server to check extra_environments is planned
next;-) once I switched the main munin-server to chef.

Have fun,

Arnold

It would be nice to handle this in a similar way to the nagios cookbook; the latest releases have added both a multi_environment config as well as a data bag for arbitrary hosts not in chef (IIRC).

On Dec 18, 2012, at 6:04 PM, Arnold Krille arnold@arnoldarts.de wrote:

On Tuesday 18 December 2012 14:25:26 Mat Davies wrote:

Just to say thanks for this patch I also end up having to support this type
of environment but didn't have time to do it properly so only hacked the
templates to include the existing non-chef munin servers this is much nicer.

I also need this for the munin-clients at the customers location which should
also accept connections from our main-munin-server.

The patch extending munin::server to check extra_environments is planned
next;-) once I switched the main munin-server to chef.

Have fun,

Arnold

I would highly suggest using an attribute that default to the old method.
That's what I added in the Nagios cookbook with the multi_environment
monitoring concept. If the user wants to grab clients from all
environment they can simple set the attribute to true.

if node['nagios']['multi_environment_monitoring']
nodes = search(:node, "hostname:[* TO ]")
else
nodes = search(:node, "hostname:[
TO *] AND
chef_environment:#{node.chef_environment}")
end

On 12/18/12 9:20 AM, "Andrea Campi" andrea.campi@zephirworks.com wrote:

It would be nice to handle this in a similar way to the nagios cookbook;
the latest releases have added both a multi_environment config as well as
a data bag for arbitrary hosts not in chef (IIRC).

On Dec 18, 2012, at 6:04 PM, Arnold Krille arnold@arnoldarts.de wrote:

On Tuesday 18 December 2012 14:25:26 Mat Davies wrote:

Just to say thanks for this patch I also end up having to support this
type
of environment but didn't have time to do it properly so only hacked
the
templates to include the existing non-chef munin servers this is much
nicer.

I also need this for the munin-clients at the customers location which
should
also accept connections from our main-munin-server.

The patch extending munin::server to check extra_environments is
planned
next;-) once I switched the main munin-server to chef.

Have fun,

Arnold

On Tue, 18 Dec 2012 19:16:09 +0000 Tim Smith Tim.Smith@Webtrends.com
wrote:

I would highly suggest using an attribute that default to the old
method. That's what I added in the Nagios cookbook with the
multi_environment monitoring concept. If the user wants to grab
clients from all environment they can simple set the attribute to
true.

if node['nagios']['multi_environment_monitoring']
nodes = search(:node, "hostname:[* TO ]")
else
nodes = search(:node, "hostname:[
TO *] AND
chef_environment:#{node.chef_environment}")
end

In my yet-to-be-opened backuppc-recipe I concat the
extra_environments_list and node.environment and build the
search-string from that.

Have fun,

Arnold