Merge lp:~michael.nelson/charms/precise/nrpe/install-nagios-plugins-basic into lp:charms/nrpe

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: 28
Merged at revision: 30
Proposed branch: lp:~michael.nelson/charms/precise/nrpe/install-nagios-plugins-basic
Merge into: lp:charms/nrpe
Diff against target: 12 lines (+1/-1)
1 file modified
hooks/install (+1/-1)
To merge this branch: bzr merge lp:~michael.nelson/charms/precise/nrpe/install-nagios-plugins-basic
Reviewer Review Type Date Requested Status
Matt Bruzek (community) Approve
Nick Moffitt Approve
Review via email:

Commit message

Install nagios-plugins-basic during install hook.

Description of the change

This may instead be a bug of charmhelpers.contrib.charmsupport.nrpe.NRPE().add_check() - let me know and I'll create a bug there instead for the silent failure.

I was testing a charm that I'm working on, and noticed that the nrpe config was silently failing when using charmhelpers.contrib.charmsupport.nrpe.NRPE().write(), resulting in the following config:

root@michael-local-machine-1:~# cat /etc/nagios/nrpe.d/check_http.cfg
# check http

Looking around, the reason is because the check_http plugin is not available, and add_check() only accepts the passed command if it finds it in the normal nagios plugins directories.

For the moment, I'm installing nagios-plugins-basic during the principle charm's install hook, which in retrospect, is probably the right thing to do (and have charmhelpers add_check() fail when the command is not found. But I thought it may also be useful if the nrpe subordinate installed this anyway - let me know.

To post a comment you must log in.
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

I find it hard to imagine a situation where we would install nagios-nrpe-server but not nagios-plugins-basic.

review: Approve
Revision history for this message
Matt Bruzek (mbruzek) wrote :

I reviewed this charm, it deploys and the nagios-nrpe-server package is installed.

$ dpkg -l | grep nrpe
ii nagios-nrpe-server 2.12-5ubuntu1.2 Nagios Remote Plugin Executor Server

Please consider updating the README for this charm on the next update. Thanks!


review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/install'
2--- hooks/install 2012-07-26 23:49:50 +0000
3+++ hooks/install 2014-02-13 11:10:52 +0000
4@@ -4,7 +4,7 @@
5 add-apt-repository -y ppa:charmers/charm-helpers
6 apt-get update
8-apt-get install -y nagios-nrpe-server charm-helper-sh
9+apt-get install -y nagios-nrpe-server nagios-plugins-basic charm-helper-sh
10 # used in base monitors
11 cat > /etc/nagios/nrpe.d/base-monitors.cfg <<EOF
12 command[check_root_disk]=/usr/lib/nagios/plugins/check_disk -w 20 -c 10 -p /


People subscribed via source and target branches