summaryrefslogtreecommitdiffstats
path: root/contrib/aix/check_kerberos
diff options
context:
space:
mode:
authorEthan Galstad <egalstad@users.sourceforge.net>2002-02-28 06:42:51 (GMT)
committerEthan Galstad <egalstad@users.sourceforge.net>2002-02-28 06:42:51 (GMT)
commit44a321cb8a42d6c0ea2d96a1086a17f2134c89cc (patch)
treea1a4d9f7b92412a17ab08f34f04eec45433048b7 /contrib/aix/check_kerberos
parent54fd5d7022ff2d6a59bc52b8869182f3fc77a058 (diff)
downloadmonitoring-plugins-44a321cb8a42d6c0ea2d96a1086a17f2134c89cc.tar.gz
Initial revision
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'contrib/aix/check_kerberos')
-rw-r--r--contrib/aix/check_kerberos49
1 files changed, 49 insertions, 0 deletions
diff --git a/contrib/aix/check_kerberos b/contrib/aix/check_kerberos
new file mode 100644
index 0000000..443ab10
--- /dev/null
+++ b/contrib/aix/check_kerberos
@@ -0,0 +1,49 @@
1#! /bin/sh
2
3#=========================================================================
4# Kerberos Ticket Checker
5#
6# This script is handy if you allow kerberos tickets to expire
7# on your nodes. The script will simply warn you when a node has
8# kerberos tickets expiring on the current date. This will allow to
9# re-initialize the tickets if you wish to do so.
10#
11# Nothing fancy here, all Nagios will show is the number of tickets
12# that are going to (or already have) expired.
13#
14# An item of note:
15#
16# We made no provisions for the weekend. If tickets expire on the
17# weekend and nobody is around, you won't see a warning on the
18# Nagios console because we look for expired on the current day
19# only. It's a good idea to have this warning emailed to the
20# appropriate admin and if there is something critical that relies
21# on Kerberos, you might want to send a page.
22#
23# Authors: TheRocker
24# SpEnTBoY
25#
26# Email: therocker@pawprints.2y.net
27# lonny@abyss.za.org
28#=========================================================================
29
30TMPFILE=/tmp/kerbtmp.hndl
31DATE=`date +%b' '%d`
32
33rsh $1 -l root /usr/lpp/ssp/kerberos/bin/klist | tr -s ' ' | cut -d' ' -f4,5,6 | grep -e "$DATE" > $TMPFILE
34
35
36if [ -s $TMPFILE ]
37then
38
39 LINES=`wc -l /tmp/kerbtmp.hndl | cut -c7-8`
40 echo "Kerberos Tickets set to expire --> \c"
41 echo "$LINES \c"
42 echo "\n"
43
44 rm -f $TMPFILE
45 exit 1
46
47fi
48 echo "Kerberos Tickets are valid"
49 exit 0