summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-09-17 19:05:49 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-09-17 19:05:49 (GMT)
commit5b37f0dd4a60cc987ebc38fd7433fb987c6b1771 (patch)
tree0367771c5a6f5f88f3ecebc960ac5c9153eadb22
parentdd3498f6b29544bd772ea4e002bb02710a9000f2 (diff)
downloadmonitoring-plugins-5b37f0dd4a60cc987ebc38fd7433fb987c6b1771.tar.gz
Plugins obsolete from main check_disk and check_ping
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@738 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--contrib/aix/check_crit_dsk66
-rw-r--r--contrib/aix/check_dsk62
-rw-r--r--contrib/aix/check_ping117
3 files changed, 0 insertions, 245 deletions
diff --git a/contrib/aix/check_crit_dsk b/contrib/aix/check_crit_dsk
deleted file mode 100644
index 566e07c..0000000
--- a/contrib/aix/check_crit_dsk
+++ /dev/null
@@ -1,66 +0,0 @@
1#!/bin/sh
2
3#=========================================================================
4# Critical Disk Checker utility
5#
6# This is the same as the disk checker utility but we use it as
7# a seperate service in Nagios to report on partitions that
8# have reached 100% capacity.
9#
10# We have excluded /dev/cd0 because the cdrom drive will always
11# report 100% capacity if a CD is in the drive.
12#
13# Authors: TheRocker
14# SpEnTBoY
15#
16# Email: therocker@pawprints.2y.net
17# lonny@abyss.za.org
18#
19#=======================================================================
20
21NUMBER=`rsh $1 -l root df -kP | grep -vE ":|/dev/cd0" | grep -E "100%" | tr -s ' '| cut -d' ' -f5 | cut -c1-3 | line`
22TMPFILE=/tmp/tmpcrit.hndl
23TMPTOO=/tmp/twocrit.hndl
24
25if [ "$NUMBER" -eq 100 ]
26then
27
28 `rsh $1 -l root df -kP |grep -vE ":|/dev/cd0" | grep -E "100%" | tr -s ' '| cut -d' ' -f6,5 >> $TMPFILE`
29
30 LINES=`wc -l /tmp/tmpcrit.hndl | cut -c8`
31 LINESCTL=`wc -l /tmp/tmpcrit.hndl | cut -c8 `
32 echo "Filesystems over 99% --> \c"
33
34#===============================================================
35# Just a little bit to check for multiple occurances of the
36# condition.
37#===============================================================
38
39 while [ $LINESCTL != 0 ]
40 do
41
42 cat $TMPFILE | tail -$LINESCTL > $TMPTOO
43 cat $TMPTOO > $TMPFILE
44 LINESCTL=$(( $LINESCTL -1 ))
45 LINES=$(( $LINES -1 ))
46 DATA=`head -1 /tmp/tmpcrit.hndl`
47 echo "( $DATA ) \c"
48
49
50 done
51 echo "\n"
52
53#===============================================================
54# File clean up. Always pick up after yourself. Disk space
55# doesn't grow on trees you know.
56#===============================================================
57
58 rm -f $TMPFILE
59 rm -f $TMPTOO
60 exit 2
61
62else
63
64 echo "No Filesystems over 99%... OK"
65 exit 0
66fi
diff --git a/contrib/aix/check_dsk b/contrib/aix/check_dsk
deleted file mode 100644
index c8ddb3f..0000000
--- a/contrib/aix/check_dsk
+++ /dev/null
@@ -1,62 +0,0 @@
1#! /bin/sh
2
3#======================================================================
4# Disk Checker utility
5#
6# Simple little script that checks the status of all partitions
7# on a node's hard disks. It will produce a warning alert and list
8# the offending filesystems in nagios.
9#
10# Authors: SpEnTBoY
11# TheRocker
12#
13# Email: lonny@abyss.za.org
14# therocker@pawprints.2y.net
15#=====================================================================
16
17NUMBER=`rsh $1 -l root df -kP | grep -v ":" | grep -E "9[0-9]%" | tr -s ' '| cut -d' ' -f5 | cut -c1-2 | line`
18TMPFILE=/tmp/tmp.hndl
19TMPTOO=/tmp/two.hndl
20
21if [ "$NUMBER" -gt 90 ]
22then
23
24 `rsh $1 -l root df -kP |grep -v ":" | grep -E "9[0-9]%" | tr -s ' '| cut -d' ' -f6,5 >> $TMPFILE`
25
26 LINES=`wc -l /tmp/tmp.hndl | cut -c8`
27 LINESCTL=`wc -l /tmp/tmp.hndl | cut -c8 `
28 echo "Filesystems over 90% --> \c"
29
30#======================================================================
31# You'll see this one in a few our shell scripts. Just chcecking for
32# multiple occurances of the warnign condition. We gotta list 'em all
33#======================================================================
34
35 while [ $LINESCTL != 0 ]
36 do
37
38 cat $TMPFILE | tail -$LINESCTL > $TMPTOO
39 cat $TMPTOO > $TMPFILE
40 LINESCTL=$(( $LINESCTL -1 ))
41 LINES=$(( $LINES -1 ))
42 DATA=`head -1 /tmp/tmp.hndl`
43 echo "( $DATA ) \c"
44
45
46 done
47 echo "\n"
48
49#===============================================================
50# Clean up all those nasty tmp files that suck up valuable
51# disk realestate.
52#===============================================================
53
54 rm -f $TMPFILE
55 rm -f $TMPTOO
56 exit 1
57
58else
59
60 echo "No Filesystems over 90%... OK"
61 exit 0
62fi
diff --git a/contrib/aix/check_ping b/contrib/aix/check_ping
deleted file mode 100644
index aaa8c84..0000000
--- a/contrib/aix/check_ping
+++ /dev/null
@@ -1,117 +0,0 @@
1#!/usr/bin/perl -w
2
3#================================================================
4#
5# This perl script will accept an argument and simply pass it
6# to ping. It works by sending 2 ping to the specified host
7# and evaluating on the average delta time of those 2 pings.
8#
9# Author: SpEnTBoY
10# Email: lonny@abyss.za.org
11# April 5,2000
12#
13#================================================================
14
15#============================
16# State predefined stuff and
17# requirements
18#============================
19
20require 5.004;
21use POSIX;
22use strict;
23
24sub usage;
25
26my $ipaddr = $ARGV[0];
27
28my $TIMEOUT = 15;
29
30my %ERRORS = ('UNKNOWN' , '-1',
31 'OK' , '0',
32 'WARNING', '1',
33 'CRITICAL', '2');
34
35my $remote = shift || &usage(%ERRORS);
36my $warning = shift || 750;
37my $critical = shift || 1000;
38
39my $state = "OK";
40my $answer = undef;
41my $offset = undef;
42my $line = undef;
43
44#============================================================
45# If theres no response we can exit the bloody thing cleanly
46# last thing I want to do is hang an AIX system ;-)
47#============================================================
48
49$SIG{'ALRM'} = sub {
50 print ("ERROR: No response from PING! (alarm)\n");
51 exit $ERRORS{"UNKNOWN"};
52};
53alarm($TIMEOUT);
54
55#================================================
56# Pass stddn from $ARGV to the command and parse
57# the info we need (namely the value for "max"
58#================================================
59
60
61
62open(PING,"/usr/sbin/ping -c 2 '$ipaddr' >&1|");
63while (<PING>) {
64 $line = $_;
65 if (/round-trip min\/avg\/max = (.+)\/(.+)\/(.+) ms/) {
66 $offset = $3;
67 last;
68 }
69}
70
71#==================================================
72# Do some error checking on the output of the file
73# and implement values for <crit> and <warn>
74# deffinitions if they were specified by the user
75# or sub in the predefined ones
76#==================================================
77
78if (defined $offset) {
79 if (abs($offset) > $warning) {
80 if (abs($offset) > $critical) {
81 $state = "CRITICAL";
82 $answer = ": Ping Time $offset MS greater than +/- $critical MS\n";
83 } else {
84 $state = "WARNING";
85 $answer = ": Ping Time $offset MS greater than +/- $warning MS\n";
86 }
87 } else {
88 $state = "OK";
89 $answer = ": Ping Time $offset MS\n";
90 }
91} else {
92 $state = "UNKNOWN";
93 $answer = ": $line\n";
94}
95print ("$state$answer");
96exit $ERRORS{$state};
97
98sub usage {
99 print "\n";
100 print "#=========================================\n";
101 print "Check_Ping 0.02 script by Lonny Selinger\n";
102 print "Made with AIX in mind ;-)\n";
103 print "#=========================================\n";
104 print "\n";
105 print "#================================================\n";
106 print " I'm going to need a few more arguments from you\n";
107 print "#================================================\n";
108 print "\n";
109 print "#================================================\n";
110 print "Usage: check_ping <host> [<warn> [<crit>]\n";
111 print "#================================================\n";
112 print "\n";
113 print "<warn> = Ping in MS at which a warning message will be generated.\n Defaults to 750.\n";
114 print "<crit> = Ping in MS at which a critical message will be generated.\n Defaults to 1000.\n\n";
115 exit $ERRORS{"UNKNOWN"};
116}
117