~charmers/charms/precise/nrpe-external-master/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
This is a pretty special purpose charm currently, and most likely you'll want
to look at lp:charms/nrpe to see if it fits your needs better. This will be
merged into that one in the not too distant future.

Some other caveats:
 - It's included in the CharmStore as an example of a workaround for the lack
   of cross-environment relations.
 - It might be obsoleted if/when cross-environment relations land in Juju core
 - It currently requires the application of out of band security groups. As an
   example, if your nagios master has an IP of 10.10.10.10 you'd want to expose
   rsync and nrpe from that machine only using the following commands (in
   Openstack, as an example - will vary by provider) so that you are only
   opening them to the specific server, rather than any IP:
    nova secgroup-add-rule juju-${JUJU_ENV} tcp 873 873 10.10.10.10/32
    nova secgroup-add-rule juju-${JUJU_ENV} tcp 5666 5666 10.10.10.10/32

This charm provides a means of interacting with a Nagios server that's managed
outside of the Juju environment. This can be useful if you have a situation
where you have a number of different Juju environments that you want to connect
to the same nagios instance until https://bugs.launchpad.net/juju/+bug/1049340
is fixed.

It's a subordinate charm, and works by creating a base set of checks in
/etc/nagios/nrpe.d, including check_load, check_users, check_disk_root. All of
the options for these are configurable but sensible defaults have been set in
config.yaml.

The most important config option that you'll want to set is the "nagios_master"
option. This should be the hostname or the IP address of the Nagios server that
you want to connect to. It will be added to the "allowed_hosts" configuration
option of /etc/nagios/nrpe.cfg. An rsync stanza will also then be created
allowing the Nagios server to pick up configs from /var/lib/nagios/export (as
a target called "external-nagios"), which will also be configured to allow
connections from the hostname or IP address as specified for the
"nagios_master" variable.

It's up to you to configure the Nagios master to pull the configs needed, which
will then cause it to connect back to the instances in question to run the nrpe
checks you've defined.

You will also want to modify the primary charms in question to create
service-specific checks. They should do this in the
nrpe-external-master-relation-changed hook, by dumping the checks they need
into /etc/nagios/nrpe.d, and the server side configs to call those checks into
/var/lib/nagios/export.