~webteam-backend/charms/trusty/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
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.