aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-09 22:16:55 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-09 22:16:55 +0000
commit3d5581a2c8ef459cecf72db4e856d43abe220552 (patch)
treea554b304934f1f81f683570122087c1c14d37b42
parenta5155ba94805976af4df3194614c2e2244dd0a8a (diff)
downloadsitesummary-3d5581a2c8ef459cecf72db4e856d43abe220552.tar.gz
sitesummary-3d5581a2c8ef459cecf72db4e856d43abe220552.tar.bz2
sitesummary-3d5581a2c8ef459cecf72db4e856d43abe220552.tar.xz
Generate checks for number of users, processes and apt upgrades too.
-rw-r--r--debian/changelog8
-rw-r--r--nagios-templates.cfg15
-rwxr-xr-xsitesummary-nodes20
3 files changed, 39 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 73dbc84..61babf7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,11 @@
sitesummary (0.0.53) UNRELEASED; urgency=low
* Collect software raid status from /proc/mdstat if it exist.
- * Generate Nagios checks for software raid, zombie processes, swap,
- dns, imaps, nfs and squid too. Rename Nagios services to use
- lower case characters.
+
+ * Generate Nagios checks for number of users, software raid,
+ processes, zombie processes, apt upgrades, swap, dns, imaps, nfs
+ and squid too. Rename Nagios services to use lower case
+ characters.
* Only reload Nagios in cron job if the generated configuration
changed.
* Quiet down first invocation of the cron job.
diff --git a/nagios-templates.cfg b/nagios-templates.cfg
index 766cee6..6edd5ad 100644
--- a/nagios-templates.cfg
+++ b/nagios-templates.cfg
@@ -143,6 +143,11 @@ define command{
}
define command{
+ command_name check_procs
+ command_line /usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$
+}
+
+define command{
command_name check_procs_zombie
command_line /usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s Z
}
@@ -153,6 +158,16 @@ define command{
}
define command{
+ command_name check_users
+ command_line /usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
+}
+
+define command{
+ command_name check_apt
+ command_line /usr/lib/nagios/plugins/check_apt
+}
+
+define command{
command_name check-host-alive
command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
}
diff --git a/sitesummary-nodes b/sitesummary-nodes
index 153084e..f9d41fe 100755
--- a/sitesummary-nodes
+++ b/sitesummary-nodes
@@ -146,9 +146,27 @@ define service {
define service {
use server-service
host_name $hostname
- service_description zombie procs
+ service_description current users
+ check_command ${redirect}check_users!20!50
+}
+define service {
+ use server-service
+ host_name $hostname
+ service_description processes total
+ check_command ${redirect}check_procs!250!400
+}
+define service {
+ use server-service
+ host_name $hostname
+ service_description processes zombie
check_command ${redirect}check_procs_zombie!20!100
}
+define service {
+ use server-service
+ host_name $hostname
+ service_description apt-updates
+ check_command ${redirect}check_apt
+}
EOF
# check disk free space