aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--nagios-nrpe-commands.cfg1
-rw-r--r--nagios-templates.cfg5
-rwxr-xr-xsitesummary-nodes5
4 files changed, 12 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index b5d8559..8f8c3c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ sitesummary (0.0.57~svn61884) UNRELEASED; urgency=low
* Correct name of cups package when generating Nagios check for
cups.
+ * Add SMTP check to Nagios configuration.
-- Petter Reinholdtsen <pere@debian.org> Thu, 21 Jan 2010 16:37:11 +0100
diff --git a/nagios-nrpe-commands.cfg b/nagios-nrpe-commands.cfg
index fdd7bb0..c264f3e 100644
--- a/nagios-nrpe-commands.cfg
+++ b/nagios-nrpe-commands.cfg
@@ -11,4 +11,5 @@ command[check_ntp]=/usr/lib/nagios/plugins/check_ntp -H localhost
command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$
command[check_procs_cron]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C cron
command[check_procs_zombie]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s Z
+command[check_smtp]=/usr/lib/nagios/plugins/check_smtp -H localhost
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w $ARG1 -c $ARG2$
diff --git a/nagios-templates.cfg b/nagios-templates.cfg
index 36ab796..4fdd2fb 100644
--- a/nagios-templates.cfg
+++ b/nagios-templates.cfg
@@ -153,6 +153,11 @@ define command{
}
define command{
+ command_name check_smtp
+ command_line /usr/lib/nagios/plugins/check_smtp -H localhost
+}
+
+define command{
command_name check_squid
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -e 'HTTP/1.0 200 OK'
}
diff --git a/sitesummary-nodes b/sitesummary-nodes
index 3f2d187..73979bb 100755
--- a/sitesummary-nodes
+++ b/sitesummary-nodes
@@ -306,6 +306,11 @@ sub generate_nagios_config {
"check_nfs")
if is_pkg_installed($hostid, "nfs-kernel-server");
+ print_nagios_service_check($remote, $hostname, "smtp",
+ "check_smtp")
+ if (is_pkg_installed($hostid, "exim4-daemon-heavy") ||
+ is_pkg_installed($hostid, "exim4-daemon-light"));
+
# These need argument passing (as in dont_blame_nrpe=1)
next unless ((!$remote && $nagiosclient)
|| ($remote && "args" eq $nrpestatus));