aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog5
-rw-r--r--debian/sitesummary-client.postinst12
-rw-r--r--debian/sitesummary-client.templates7
-rwxr-xr-xdebian/sitesummary.cron.daily3
-rw-r--r--debian/sitesummary.postinst12
-rw-r--r--debian/sitesummary.templates6
6 files changed, 43 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index e9d7232..a63c7ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,11 @@ sitesummary (0.0.55) UNRELEASED; urgency=low
conffile questions during upgrades if the contacts are changed and
only the commands change.
* Drop Nagios dhcp check, as it do not seem to work.
+ * Provide debconf preseeding suppport (using hidden questions) for
+ activating Nagios NRPE configuration on clients and Nagios
+ autoconfiguration on the server.
+ * Automatically detect if remote NRPE commands can be used for
+ Nagios checks, and if arguments can be passed or not.
-- Petter Reinholdtsen <pere@debian.org> Sat, 16 Jan 2010 21:06:29 +0100
diff --git a/debian/sitesummary-client.postinst b/debian/sitesummary-client.postinst
index 4a21703..ae1a242 100644
--- a/debian/sitesummary-client.postinst
+++ b/debian/sitesummary-client.postinst
@@ -79,6 +79,18 @@ else
echo "$HOSTCLASS" > /etc/sitesummary/hostclass
fi
+config=/etc/nagios/nrpe.d/sitesummary-nrpe.cfg
+if [ ! -f $config ] ; then
+ db_get sitesummary-client/enable-nagios-nrpe-config
+ if [ true = "$RET" ] ; then
+ mkdir -p $(dirname $config)
+ cat > $config <<EOF
+dont_blame_nrpe=1
+include=/etc/nagios/sitesummary-nrpe-commands.cfg
+EOF
+ fi
+fi
+
db_stop
# Switched from cron.d to cron.daily script in version 0.0.12
diff --git a/debian/sitesummary-client.templates b/debian/sitesummary-client.templates
index 1adcaab..8247234 100644
--- a/debian/sitesummary-client.templates
+++ b/debian/sitesummary-client.templates
@@ -23,3 +23,10 @@ Type: string
_Description: Host class:
Insert string identifying the host class, like workstation, server,
laptop, thin client etc.
+
+Template: sitesummary-client/enable-nagios-nrpe-config
+Type: boolean
+Default: false
+Description: Activate the Nagios NRPE config feature?
+ This is an internal (hidden) debconf question. It should not be translated.
+
diff --git a/debian/sitesummary.cron.daily b/debian/sitesummary.cron.daily
index 36623f9..e408a7a 100755
--- a/debian/sitesummary.cron.daily
+++ b/debian/sitesummary.cron.daily
@@ -7,7 +7,6 @@ set -e
daylimit=120
makewebreport=/usr/sbin/sitesummary-makewebreport
nodes=/usr/sbin/sitesummary-nodes
-nagiosopts=-r
# Modify this in collector.cfg to /etc/munin/ to automatically replace
# the default munin configuration.
@@ -75,7 +74,7 @@ EOF
generate_nagios_config() {
(
- sitesummary-nodes -n $nagiosopts
+ sitesummary-nodes -n
if [ -f $NAGIOSDIR/nagios-generated.cfg.post ] ; then
cat $NAGIOSDIR/nagios-generated.cfg.post
diff --git a/debian/sitesummary.postinst b/debian/sitesummary.postinst
index b013708..aa08ae1 100644
--- a/debian/sitesummary.postinst
+++ b/debian/sitesummary.postinst
@@ -33,6 +33,18 @@ case "$1" in
fi
fi
+ config=/etc/default/nagios3
+ if grep -q '^NAGIOSCFG="/etc/nagios3/sitesummary.cfg"$' "$config"; then
+ :
+ else
+ db_get sitesummary/enable-nagios-config
+ if [ true = "$RET" ] ; then
+ mkdir -p $(dirname $config)
+ echo 'NAGIOSCFG="/etc/nagios3/sitesummary.cfg"' \
+ >> /etc/default/nagios3
+ fi
+ fi
+
# Generate the web page at install time
[ -f /var/lib/sitesummary/www/index.html ] || \
/etc/cron.daily/sitesummary
diff --git a/debian/sitesummary.templates b/debian/sitesummary.templates
index a09b956..aa279d7 100644
--- a/debian/sitesummary.templates
+++ b/debian/sitesummary.templates
@@ -4,3 +4,9 @@ Default: false
Description: Activate the munin config replacement feature?
This is an internal (hidden) debconf question. It should not be translated.
+Template: sitesummary/enable-nagios-config
+Type: boolean
+Default: false
+Description: Activate the Nagios autoconfig feature?
+ This is an internal (hidden) debconf question. It should not be translated.
+