aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/check_breeze.pl22
-rw-r--r--contrib/check_dhcp.c10
-rw-r--r--contrib/check_flexlm.pl82
-rw-r--r--contrib/check_hltherm.c209
-rwxr-xr-xcontrib/check_hprsc.pl215
-rw-r--r--contrib/check_ipxping.c5
-rw-r--r--contrib/check_mysql.c4
-rw-r--r--contrib/check_uptime.c8
-rw-r--r--contrib/check_wave.pl77
-rw-r--r--contrib/readme.txt115
-rw-r--r--contrib/tarballs/berger-ping.tar.gzbin2411 -> 2411 bytes
-rw-r--r--contrib/tarballs/bowen-langley_plugins.tar.gzbin28728 -> 28742 bytes
-rw-r--r--contrib/tarballs/check_bgp-1.0.tar.gzbin1444 -> 1469 bytes
-rw-r--r--contrib/tarballs/check_breeze.tar.gzbin358 -> 0 bytes
-rw-r--r--contrib/tarballs/check_flexlm.tar.gzbin1169 -> 0 bytes
-rw-r--r--contrib/tarballs/check_hltherm.tar.gzbin2087 -> 0 bytes
-rw-r--r--contrib/tarballs/check_hprsc.tar.gzbin1942 -> 0 bytes
-rw-r--r--contrib/tarballs/check_memory.tgz (renamed from contrib/check_memory.tgz)bin5813 -> 5813 bytes
-rw-r--r--contrib/tarballs/check_radius.tar.gzbin25173 -> 25190 bytes
-rw-r--r--contrib/tarballs/check_wave.tar.gzbin591 -> 0 bytes
-rw-r--r--contrib/tarballs/hopcroft-plugins.tar.gzbin3657 -> 3657 bytes
-rw-r--r--contrib/tarballs/radius.tar.gzbin1913 -> 1913 bytes
22 files changed, 633 insertions, 114 deletions
diff --git a/contrib/check_breeze.pl b/contrib/check_breeze.pl
new file mode 100644
index 00000000..bb837657
--- /dev/null
+++ b/contrib/check_breeze.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+# Plugin to test signal strength on Breezecom wireless equipment
+# Contributed by Jeffrey Blank
+
+$Host=$ARGV[0];
+$sig_crit=$ARGV[1];
+$sig_warn=$ARGV[2];
+$sig=0;
+$sig = `snmpget $Host public .1.3.6.1.4.1.710.3.2.3.1.3.0`;
+@test=split(/ /,$sig);
+$sig=@test[2];
+$sig=int($sig);
+if ($sig>100){$sig=100}
+
+print "Signal Strength at: $sig%\n";
+if ($sig<$sig_crit)
+ {exit(2)}
+if ($sig<$sig_warn)
+ {exit(1)}
+
+exit(0);
diff --git a/contrib/check_dhcp.c b/contrib/check_dhcp.c
index 8168b947..6a6037f1 100644
--- a/contrib/check_dhcp.c
+++ b/contrib/check_dhcp.c
@@ -4,7 +4,7 @@
*
* Program: DHCP plugin for Nagios
* License: GPL
-* Copyright (c) 2001 Ethan Galstad (nagios@nagios.org)
+* Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org)
*
* License Information:
*
@@ -437,7 +437,7 @@ int send_dhcp_packet(void *buffer, int buffer_size, int sock, struct sockaddr_in
struct sockaddr_in myname;
int result;
- result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr_in *)dest,sizeof(*dest));
+ result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest));
#ifdef DEBUG
printf("send_dhcp_packet result: %d\n",result);
@@ -480,11 +480,11 @@ int receive_dhcp_packet(void *buffer, int buffer_size, int sock, int timeout, st
/* why do we need to peek first? i don't know, its a hack. without it, the source address of the first packet received was
not being interpreted correctly. sigh... */
bzero(&source_address,sizeof(source_address));
- recv_result=recvfrom(sock,(char *)buffer,buffer_size,MSG_PEEK,(struct sockaddr_in *)&source_address,&address_size);
+ recv_result=recvfrom(sock,(char *)buffer,buffer_size,MSG_PEEK,(struct sockaddr *)&source_address,&address_size);
#ifdef DEBUG
printf("recv_result_1: %d\n",recv_result);
#endif
- recv_result=recvfrom(sock,(char *)buffer,buffer_size,0,(struct sockaddr_in *)&source_address,&address_size);
+ recv_result=recvfrom(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)&source_address,&address_size);
#ifdef DEBUG
printf("recv_result_2: %d\n",recv_result);
#endif
@@ -812,7 +812,7 @@ void print_help(void){
/*print_revision(PROGNAME,"$Revision$");*/
- printf("Copyright (c) 2001 Ethan Galstad (nagios@nagios.org)\n\n");
+ printf("Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org)\n\n");
printf("This plugin tests the availability of DHCP servers on a network.\n\n");
print_usage();
diff --git a/contrib/check_flexlm.pl b/contrib/check_flexlm.pl
new file mode 100644
index 00000000..8fa0e334
--- /dev/null
+++ b/contrib/check_flexlm.pl
@@ -0,0 +1,82 @@
+#!/usr/local/bin/perl
+#
+# usage:
+# check_flexlm.pl license_file
+#
+# Check available flexlm license managers.
+# Use lmstat to check the status of the license server
+# described by the license file given as argument.
+# Check and interpret the output of lmstat
+# and create returncodes and output.
+#
+# Contrary to the nagios concept, this script takes
+# a file, not a hostname as an argument and returns
+# the status of hosts and services described in that
+# file. Use these hosts.cfg entries as an example
+#
+#host[anchor]=any host will do;some.address.com;;check-host-alive;3;120;24x7;1;1;1;
+#service[anchor]=yodel;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yodel_lic
+#service[anchor]=yeehaw;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yeehaw_lic
+#command[check_flexlm]=/some/path/libexec/check_flexlm.pl $ARG1$
+#
+# Notes:
+# - you need the lmstat utility which comes with flexlm.
+# - set the correct path in the variable $lmstat.
+#
+# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com
+# current status: looks like working
+#
+# Copyright Notice: Do as you please, credit me, but don't blame me
+#
+
+# Just in case of problems, let's not hang Nagios
+$SIG{'ALRM'} = sub {
+ print "No Answer from Client\n";
+ exit 2;
+};
+alarm(20);
+
+$lmstat = "/opt/lic/sw/cadadm/default/bin/lmstat";
+
+$licfile = shift;
+
+#print "$licfile \n";
+
+open CMD,"$lmstat -c $licfile |";
+
+$serverup = 0;
+
+while ( <CMD> ) {
+ if ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*)/ ) {
+ $ls1 = $1;
+ $ls2 = $2;
+ $ls3 = $3;
+ $lf1 = $lf2 = $lf3 = 0;
+ $servers = 3;
+ } elsif ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*)/ ) {
+ $ls1 = $1;
+ $ls2 = $ls3 = "";
+ $lf1 = $lf2 = $lf3 = 0;
+ $servers = 1;
+ } elsif ( / *$ls1: license server UP/ ) {
+ print "$ls1 UP, ";
+ $lf1 = 1
+ } elsif ( / *$ls2: license server UP/ ) {
+ print "$ls2 UP, ";
+ $lf2 = 1
+ } elsif ( / *$ls3: license server UP/ ) {
+ print "$ls3 UP, ";
+ $lf3 = 1
+ } elsif ( / *([^:]*: UP .*)/ ) {
+ print " license server for $1\n";
+ $serverup = 1;
+ }
+}
+if ( $serverup == 0 ) {
+ print " license server not running\n";
+ exit 2;
+}
+
+exit 0 if ( $servers == $lf1 + $lf2 + $lf3 );
+exit 1 if ( $servers == 3 && $lf1 + $lf2 + $lf3 == 2 );
+exit 2;
diff --git a/contrib/check_hltherm.c b/contrib/check_hltherm.c
new file mode 100644
index 00000000..85c989f5
--- /dev/null
+++ b/contrib/check_hltherm.c
@@ -0,0 +1,209 @@
+/******************************************************************************************
+ *
+ * CHECK_HLTHERM.C
+ *
+ * Program: Hot Little Therm temperature plugin for Nagios
+ * License: GPL
+ * Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org)
+ *
+ * Last Modified: 02-28-2002
+ *
+ * Command line: check_hltherm <probe> <wtemp> <ctemp> [-l label] [-s scale] [-lower]
+ *
+ * Description:
+ *
+ * This plugin checks the temperature of a given temperature probe on a
+ * Hot Little Therm digital thermometer. The plugin uses the 'therm' utility
+ * that is included with the HLT software to check the probe temperature. Both
+ * the HLT digital thermometer and software are produced by Spiderplant. See
+ * their website at http://www.spiderplant.com/hlt for more information.
+ *
+ *****************************************************************************************/
+
+#include "config.h"
+#include "common.h"
+#include "popen.h"
+
+#define DEFAULT_TIMEOUT 10 /* default timeout in seconds */
+
+#define HLTHERM_COMMAND "/usr/local/bin/therm" /* this should be moved out to the configure script */
+
+
+static void timeout_alarm_handler(int); /* author must provide */
+int process_arguments(int, char **);
+
+int timeout_interval=DEFAULT_TIMEOUT;
+
+double wtemp=0.0L;
+double ctemp=0.0L;
+
+int check_lower_temps=FALSE;
+
+char probe[MAX_INPUT_BUFFER]="";
+char label[MAX_INPUT_BUFFER]="Temperature";
+char scale[MAX_INPUT_BUFFER]="Degrees";
+
+FILE *fp;
+
+
+int main(int argc, char **argv){
+ int result=STATE_OK;
+ char command[MAX_INPUT_BUFFER];
+ double temp=0.0L;
+ char input_buffer[MAX_INPUT_BUFFER];
+ int found=0;
+
+ /* process command line arguments */
+ result=process_arguments(argc,argv);
+
+ /* display usage if there was a problem */
+ if(result==ERROR){
+ printf("Incorrect arguments supplied\n");
+ printf("\n");
+ printf("Hot Little Therm temperature plugin for Nagios\n");
+ printf("Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org)\n");
+ printf("Last Modified: 02-28-2002\n");
+ printf("License: GPL\n");
+ printf("\n");
+ printf("Usage: %s <probe> <wtemp> <ctemp> [-l label] [-s scale] [-lower]\n",argv[0]);
+ printf("\n");
+ printf("Options:\n");
+ printf(" <wtemp> = Temperature necessary to result in a WARNING state\n");
+ printf(" <ctemp> = Temperature necessary to result in a CRITICAL state\n");
+ printf(" [label] = A descriptive label for the probe. Example: \"Outside Temp\"\n");
+ printf(" [scale] = A descriptive label for the temperature scale. Example: \"Celsius\"\n");
+ printf(" [-lower] = Evaluate temperatures with lower values being more critical\n");
+ printf("\n");
+ printf("This plugin checks the temperature of a given temperature probe on a\n");
+ printf("Hot Little Therm digital thermometer. The plugin uses the 'therm' utility\n");
+ printf("included with the HLT software to check the probe temperature. Both the\n");
+ printf("HLT digital thermometer and software are produced by Spiderplant. See\n");
+ printf("their website at http://www.spiderplant.com/hlt for more information.\n");
+ printf("\n");
+ return STATE_UNKNOWN;
+ }
+
+
+ result=STATE_OK;
+
+ /* Set signal handling and alarm */
+ if(signal(SIGALRM,timeout_alarm_handler)==SIG_ERR){
+ printf("Cannot catch SIGALRM");
+ return STATE_UNKNOWN;
+ }
+
+ /* handle timeouts gracefully */
+ alarm(timeout_interval);
+
+ /* create the command line we're going to use */
+ snprintf(command,sizeof(command),"%s %s",HLTHERM_COMMAND,probe);
+ command[sizeof(command)-1]='\x0';
+
+ /* run the command to check the temperature on the probe */
+ fp=spopen(command);
+ if(fp==NULL){
+ printf("Could not open pipe: %s\n",command);
+ return STATE_UNKNOWN;
+ }
+
+ if(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){
+ found=1;
+ temp=(double)atof(input_buffer);
+ }
+
+ /* close the pipe */
+ spclose(fp);
+
+ if(result==STATE_OK){
+
+ if(found==0){
+ printf("Therm problem - Could not read program output\n");
+ result=STATE_CRITICAL;
+ }
+ else{
+ if(check_lower_temps==TRUE){
+ if(temp<=ctemp)
+ result=STATE_CRITICAL;
+ else if(temp<=wtemp)
+ result=STATE_WARNING;
+ }
+ else{
+ if(temp>=ctemp)
+ result=STATE_CRITICAL;
+ else if(temp>=wtemp)
+ result=STATE_WARNING;
+ }
+
+ printf("Therm %s: %s = %2.1f %s\n",(result==STATE_OK)?"ok":"problem",label,temp,scale);
+ }
+ }
+
+ return result;
+ }
+
+
+/* process command-line arguments */
+int process_arguments(int argc, char **argv){
+ int x;
+
+ /* not enough options were supplied */
+ if(argc<4)
+ return ERROR;
+
+ /* first option is always the probe name */
+ strncpy(probe,argv[1],sizeof(probe)-1);
+ probe[sizeof(probe)-1]='\x0';
+
+ /* 2nd and 3rd options are temperature thresholds */
+ wtemp=(double)atof(argv[2]);
+ ctemp=(double)atof(argv[3]);
+
+ /* process all remaining arguments */
+ for(x=5;x<=argc;x++){
+
+ /* we got the lower temperature option */
+ if(!strcmp(argv[x-1],"-lower"))
+ check_lower_temps=TRUE;
+
+ /* we got the label */
+ else if(!strcmp(argv[x-1],"-l")){
+ if(x<argc){
+ strncpy(label,argv[x],sizeof(label));
+ label[sizeof(label)-1]='\x0';
+ x++;
+ }
+ else
+ return ERROR;
+ }
+
+ /* we got the scale */
+ else if(!strcmp(argv[x-1],"-s")){
+ if(x<argc){
+ strncpy(scale,argv[x],sizeof(scale));
+ scale[sizeof(scale)-1]='\x0';
+ x++;
+ }
+ else
+ return ERROR;
+ }
+
+ /* else we got something else... */
+ else
+ return ERROR;
+ }
+
+ return OK;
+ }
+
+
+
+/* handle timeouts gracefully... */
+static void timeout_alarm_handler(int signo){
+
+ if(signo==SIGALRM){
+
+ kill(childpid[fileno(fp)],SIGKILL);
+ printf("Therm problem - Check timed out after %d seconds\n",timeout_interval);
+ exit(STATE_CRITICAL);
+ }
+ }
diff --git a/contrib/check_hprsc.pl b/contrib/check_hprsc.pl
new file mode 100755
index 00000000..23e6261f
--- /dev/null
+++ b/contrib/check_hprsc.pl
@@ -0,0 +1,215 @@
+#!/usr/bin/perl -wT
+#
+# Copyright (c) 2000 Hugo Gayosso
+#
+# Description:
+# Nagios plug-in that monitors the resources on an HP-UX machine
+# by querying the SNMP daemon
+#
+# License: General Public License (GPL)
+# http://www.gnu.org/copyleft/gpl.txt
+#
+# ChangeLog
+#
+
+# Requirements: Perl 5.005 or higher
+
+# Variable initialization
+$ENV{'PATH'}="";
+$ENV{'ENV'}="";
+$ENV{'BASH_ENV'}="";
+
+
+if (-e "/usr/bin/snmpwalk") {
+ $snmpwalk = "/usr/bin/snmpwalk";
+} elsif (-e "/usr/local/bin/snmpwalk") {
+ $snmpwalk = "/usr/local/snmpwalk";
+}
+
+
+# HP-UX SNMP OIDs
+$filesystemID1_OID = ".1.3.6.1.4.1.11.2.3.1.2.2.1.1";
+$mounted_OID = ".1.3.6.1.4.1.11.2.3.1.2.2.1.3";
+$totalspace_OID = ".1.3.6.1.4.1.11.2.3.1.2.2.1.4";
+$freespace_OID = ".1.3.6.1.4.1.11.2.3.1.2.2.1.6";
+$path_OID = ".1.3.6.1.4.1.11.2.3.1.2.2.1.10";
+$cpu_5min_OID = ".1.3.6.1.4.1.11.2.3.1.1.4";
+
+use Getopt::Long;
+
+GetOptions( "check-filesystem" => \$chk_fs,
+ "show-filesystems" => \$show_fs,
+ "check-filesystemID" => \$chk_fsid,
+ "check-cpu" => \$chk_cpu,
+ "host=s" => \$target_host,
+ "community=s" => \$target_community,
+ "filesystemID1=i" => \$fsid1_opt,
+ "filesystem=s" => \$fs_opt,
+ "warning=i" => \$warning_opt,
+ "critical=i" => \$critical_opt);
+
+if ($chk_fs) {
+ walk_data($snmpwalk, $target_host, $target_community, $mounted_OID );
+ walk_data($snmpwalk, $target_host, $target_community, $totalspace_OID );
+ walk_data($snmpwalk, $target_host, $target_community, $freespace_OID ); check_filesystem($fs_opt, $warning_opt, $critical_opt);
+} elsif ($show_fs) {
+ walk_data($snmpwalk, $target_host, $target_community, $filesystemID1_OID);
+ walk_data($snmpwalk, $target_host, $target_community, $mounted_OID );
+ walk_data($snmpwalk, $target_host, $target_community, $path_OID);
+ show_filesystem();
+} elsif ($chk_fsid){
+ $totalspace_fsID_OID = "$totalspace_OID.$fsid1_opt";
+ $freespace_fsID_OID = "$freespace_OID.$fsid1_opt";
+ walk_data($snmpwalk, $target_host, $target_community, $totalspace_fsID_OID);
+ walk_data($snmpwalk, $target_host, $target_community, $freespace_fsID_OID);
+ check_filesystemID1($fsid1_opt, $warning_opt, $critical_opt);
+} elsif ($chk_cpu) {
+ get_cpu_load($snmpwalk, $target_host, $target_community, $cpu_5min_OID);
+ check_cpu_5min($cpu, $warning_opt, $critical_opt);
+} else {
+ print "\n\nUsage:\n";
+ print "Checking 5-min CPU Load:\n";
+ print " $0 --check-cpu -warning <threshold> --critical <threshold> --host <yourhost> --community <SNMP community>\n\n";
+ print "Checking local filesystem mounted on a host:\n";
+ print " $0 --show-filesystems --host <hostname> --community <SNMP community>\n\n";
+ print "Checking by filesystem name:\n";
+ print " $0 --check-filesystem --filesystem </dev/vg00/lvol1> --warning <% used space> --critical <% used space> --host <hostname> --community <SNMP community>\n\n";
+ print "Checking by filesystem ID:\n";
+ print " $0 --check-filesystemID --filesystemID <filesystemID1> --warning <% used space> --critical <% used space> --host <hostname> --community <SNMP community>\n\n";
+}
+
+sub get_cpu_load {
+ my ($snmpwalk, $target_host, $target_community, $OID) = @_;
+ die "cannot fork: $!" unless defined($pid = open(SNMPWALK, "-|"));
+
+ if ($pid) { # parent
+ while (<SNMPWALK>) {
+ my @snmpdata = split(/:/,$_);
+ $cpu = $snmpdata[1]/100;
+ }
+ close(SNMPWALK) or warn "kid exited $?";
+ } else { # child
+ exec($snmpwalk,$target_host,$target_community,$OID) or die "can't exec program: $!";
+ }
+}
+
+sub walk_data {
+#This function queries the SNMP daemon for the specific OID
+ my ($snmpwalk, $target_host, $target_community, $OID) = @_;
+
+ die "cannot fork: $!" unless defined($pid = open(SNMPWALK, "-|"));
+
+ if ($pid) { # parent
+ while (<SNMPWALK>) {
+ $output = $_;
+ sort_walk_data($output);
+ }
+ close(SNMPWALK) or warn "kid exited $?";
+ } else { # child
+ exec($snmpwalk,$target_host,$target_community,$OID) or die "can't exec program: $!";
+ }
+}
+
+sub sort_walk_data {
+ my ($snmp_data) = @_;
+ @fields = split(/\./,$snmp_data);
+ $item = $fields[8];
+ $filesystemID1 = $fields[9];
+ @fields2 = split(/=/,$fields[10]);
+# $filesystemID2 = $fields2[0];
+ $value = $fields2[1];
+ chomp($value);
+ if ($value =~ /"/) {
+ @fields3 = split(/"/,$value);
+ $value = $fields3[1];
+ }
+ if ($item == 3) {
+ $mounted{$filesystemID1} = "$value";
+ } elsif ($item == 4) {
+ $totalspace{$filesystemID1} = "$value";
+ } elsif ($item == 6) {
+ $freespace{$filesystemID1} = "$value";
+ } elsif ($item == 10) {
+ $filesystempath{$filesystemID1} = "$value";
+ }
+}
+
+sub show_filesystem {
+ print "\n\nfilesystemID1\tmounted filesystem\tfilesystem path\n";
+ foreach $element (keys %mounted) {
+ print "$element\t$mounted{$element}\t\t$filesystempath{$element}\n";
+ }
+ print "\n\n";
+}
+
+sub check_filesystem {
+
+# Warning = percentage of used space >= $warning and < $critical
+# Critical = percentage of used space > $warning and >= $critical
+# OK = percentage of used space < $warning and < $critical
+
+ my ($mounted_filesystem, $warning, $critical) = @_;
+ foreach $element (keys %mounted) {
+ if ($mounted{$element} eq $mounted_filesystem) {
+ my $warning_result = $totalspace{$element}*(100-$warning)/100;
+ my $critical_result = $totalspace{$element}*(100-$critical)/100;
+ my $result_percent = $freespace{$element}*100/$totalspace{$element};
+ if (($freespace{$element} <= $warning_result) && ($freespace{$element} > $critical_result)) {
+ printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%";
+ exit 1;
+ } elsif ($freespace{$element} <= $critical_result) {
+ printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%";
+ exit 2;
+ } else {
+ printf "Disk ok - %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%";
+ exit 0;
+ }
+ }
+ }
+ print "$mounted_filesystem doesn't exist in $target_host\n\n";
+ exit -1;
+}
+
+sub check_filesystemID1{
+# Warning = percentage of used space >= $warning and < $critical
+# Critical = percentage of used space > $warning and >= $critical
+# OK = percentage of used space < $warning and < $critical
+
+ my ($fsid1, $warning, $critical) = @_;
+ foreach $element (keys %totalspace) {
+ if ($element eq $fsid1) {
+ my $warning_result = $totalspace{$element}*(100-$warning)/100;
+ my $critical_result = $totalspace{$element}*(100-$critical)/100;
+ my $result_percent = $freespace{$element}*100/$totalspace{$element};
+ if (($freespace{$element} <= $warning_result) && ($freespace{$element} >= $critical_result)) {
+ printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%";
+ exit 1;
+ } elsif ($freespace{$element} <= $critical_result) {
+ printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%";
+ exit 2;
+ } else {
+ printf "Disk ok - %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%";
+ exit 0;
+ }
+ }
+ }
+ print "$fsid1 doesn't exist in $target_host\n\n";
+ exit -1;
+}
+
+sub check_cpu_5min {
+ my ($cpu, $warn, $crit) = @_;
+ if ($cpu >= $crit) {
+ print "Critical- 5-min load: $cpu\n";
+ exit 2;
+ } elsif ($cpu >= $warn) {
+ print "Warning - 5-min load: $cpu\n";
+ exit 1;
+ } else {
+ print "Load ok - 5-min load: $cpu\n";
+ exit 0;
+ }
+}
+
+
+
diff --git a/contrib/check_ipxping.c b/contrib/check_ipxping.c
index 1ba10fe6..937b921a 100644
--- a/contrib/check_ipxping.c
+++ b/contrib/check_ipxping.c
@@ -27,9 +27,10 @@
*
*****************************************************************************************/
-#include "../common/config.h"
-#include "../common/common.h"
+#include "config.h"
+#include "common.h"
#include "netutils.h"
+#include "popen.h"
/* this should be moved out to the configure script! */
#define IPXPING_COMMAND "/tmp/ipxping/ipxping"
diff --git a/contrib/check_mysql.c b/contrib/check_mysql.c
index 9abacf87..56725dc4 100644
--- a/contrib/check_mysql.c
+++ b/contrib/check_mysql.c
@@ -30,8 +30,8 @@
*
*******************************************************************/
-#include "../common/config.h"
-#include "../common/common.h"
+#include "config.h"
+#include "common.h"
#include "mysql.h"
MYSQL mysql;
diff --git a/contrib/check_uptime.c b/contrib/check_uptime.c
index 46a1b826..fe981237 100644
--- a/contrib/check_uptime.c
+++ b/contrib/check_uptime.c
@@ -21,10 +21,10 @@
*
*****************************************************************************/
-#include "common/config.h"
-#include "common/common.h"
-#include "common/utils.h"
-#include "common/popen.h"
+#include "config.h"
+#include "common.h"
+#include "utils.h"
+#include "popen.h"
int main(int argc, char **argv)
{
diff --git a/contrib/check_wave.pl b/contrib/check_wave.pl
new file mode 100644
index 00000000..56b59fe0
--- /dev/null
+++ b/contrib/check_wave.pl
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+
+# CHECK_WAVE.PL
+# Plugin to test signal strength on Speedlan wireless equipment
+# Contributed by Jeffry Blank
+
+$Host=$ARGV[0];
+$sig_crit=$ARGV[1];
+$sig_warn=$ARGV[2];
+
+
+
+
+$low1 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
+@test=split(/ /,$low1);
+$low1=@test[2];
+
+
+$med1 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
+@test=split(/ /,$med1);
+$med1=@test[2];
+
+
+$high1 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
+@test=split(/ /,$high1);
+$high1=@test[2];
+
+sleep(2);
+
+
+
+$snr = `snmpget $Host public .1.3.6.1.4.1.762.2.5.2.1.17.1`;
+@test=split(/ /,$snr);
+$snr=@test[2];
+$snr=int($snr*25);
+$low2 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
+@test=split(/ /,$low2);
+$low2=@test[2];
+
+
+$med2 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
+@test=split(/ /,$med2);
+$med2=@test[2];
+
+
+$high2 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
+@test=split(/ /,$high2);
+$high2=@test[2];
+
+
+
+$low=$low2-$low1;
+$med=$med2-$med1;
+$high=$high2-$high1;
+
+$tot=$low+$med+$high;
+
+
+if ($tot==0)
+ {
+ $ss=0;
+ }
+else
+ {
+ $lowavg=$low/$tot;
+ $medavg=$med/$tot;
+ $highavg=$high/$tot;
+ $ss=($medavg*50)+($highavg*100);
+ }
+printf("Signal Strength at: %3.0f%, SNR at $snr%",$ss);
+#print "Signal Strength at: $ss%, SNR at $snr%";
+if ($ss<$sig_crit)
+ {exit(2)}
+if ($ss<$sig_warn)
+ {exit(1)}
+
+exit(0);
diff --git a/contrib/readme.txt b/contrib/readme.txt
index d9ae0250..6438c99a 100644
--- a/contrib/readme.txt
+++ b/contrib/readme.txt
@@ -4,13 +4,22 @@ Contrib Plugins README
This directory contains plugins which have been contributed by various people, but that
have not yet been incorporated into the core plugins distribution.
+Most Perl plugins should work without modification. Some of the C plugins may require
+a few tweaks to compile.
+
If you have questions regarding the use of these plugins, try contacting the author(s)
-or post a message to the nagios-users mailing list (nagios-users@onelist.com)
+or post a message to the nagiosplug-help mailing list (nagiosplug-help@lists.sourceforge.net)
requesting assistance.
-Plugin Overview
----------------
+
+Contrib Tarballs
+----------------
+
+In addition to the plugins located in this directory, there are some additional tarballs
+containing plugins in the tarballs/ subdirectory. They have not yet been organized.
+A brief description of their contents follows.
+
berger-ping.tar.gz - Perl script version of the check_ping plugin and a corresponding
CGI (mtr.cgi) that uses mtr to traceroute a path to a host.
@@ -21,71 +30,13 @@ bowen-langley_plugins.tar.gz
(Adam Bown & Thomas Langley)
-check_bgpstate.tar.gz - Perl script intended for monitoring BGP sessions on Cisco routers.
+check_bgp-1.0.tar.gz - Perl script intended for monitoring BGP sessions on Cisco routers.
Only useful if you are using BGP4 as a routing protocol. For
critical alert the AS (autonomous system) number has to be in the
uplinks hash (see the source code). Requires SNMP read community.
(Christoph Kron)
-check_breeze.tar.gz - Perl script to test signal strength on Breezecom wireless
- equipment (Jeffrey Blank)
-
-check_dns_random.tar.gz - Perl script to see if dns resolves hosts randomly from a list
- using the check_dns plugin (Richard Mayhew)
-
-check_flexlm.tar.gz - Perl script to check a flexlm licensing manager using lmtest
- (Ernst-Dieter Martin)
-
-check_hltherm.tar.gz - C program to check the temperature on a Hot Little Therm temperature
- probe. The HLT device, along with temperature probes, can be obtained
- from Spiderplant at http://www.spiderplant.com
- (Ethan Galstad)
-
-check_ifoperstatus.tar.gz
- - Perl script that checks the operational interface status (up/down) for
- one interface on cisco/ascend routers. Especially useful for monitoring
- leased lines. Requires SNMP read community and SNMP interface key.
- (Christoph Kron)
-
-check_ifstatus.tar.gz - Perl script that checks operational interface status for every interface
- on cisco routers. Requires SNMP read community.
- (Christoph Kron)
-
-check_ipxping.tar.gz - C program that it similiar to the check_ping plugin, except that it
- send IPX ping packets to Novell servers or other IPX devices. This
- requires the ipxping binary for Linux systems. It does NOT by work
- without modification with the ipxping binary for SunOS/Solaris.
- (Ethan Galstad)
-
-check_maxchannels.tar.gz
- - Perl script that can only be used for monitoring Ascend/Lucent Max/TNT
- access server. Checks ISDN channels and modem cards. Also shows ISDN and
- modem usage. Requires SNMP read community.
- (Christoph Kron)
-
-check_maxwanstate.tar.gz
- - Perl script that can only be used for monitoring Ascend/Lucent Max/TNT
- access server. Checks if every enabled E1/T1 interface is operational
- (link active). Requires SNMP read community.
- (Christoph Kron)
-
-check_memory.tgz - C program to check available system memory - RAM, swap, buffers,
- and cache (Joshua Jackson)
-
-check_nfs.tar.gz - Perl script to test and NFS server using rpcinfo
- (Ernst-Dieter Martin)
- <NOW PART OF check_rpc IN CORE>
-
-check_ntp.tar.gz - Perl script to check an NTP time source (Bo Kernsey)
- <MOVED TO CORE>
-
-check_ora.tar.gz - Shell script that will check an Oracle database and the TNS listener.
- Unlike the check_oracle plugin, this plugin detects when a database is
- down and does not create temp files (Jason Hedden)
- <MOVED TO CORE>
-
-check_pop3.tar.gz - Perl script that checks to see if POP3 is running and whether or not
- authentication can take place (Richard Mayhew)
+check_memory.tgz - C plugin to check available system memory
check_radius.tar.gz - C program to check RADIUS authentication. This is a hacked version of
the Cistron Radiusd program radtest that acts as a plugin for Nagios.
@@ -95,24 +46,6 @@ check_radius.tar.gz - C program to check RADIUS authentication. This is a ha
will not appear in the core plugin distribution!
(Adam Jacob)
-check_real.tar.gz - C program to check the status of a REAL media server
- (Pedro Leite)
- <MOVED TO CORE>
-
-check_rpc.pl.gz - Perl script to check rpc services. Will check to see if the a specified
- program is running on the specified server (Chris Kolquist)
-
-check_sap.tar.gz - Shell script to check an SAP message or application server. Requires
- that you install the saprfc-devel-45A-1.i386.rpm (or higher) package
- on your system. The package can be obtained from the SAP FTP site in
- the /general/misc/unsupported/linux directory. (Kavel Salavec)
-
-check_uptime.tar.gz - C program to check system uptime. Must be compiled with the release
- 1.2.8 or later of the plugins. (Teresa Ramanan)
-
-check_wave.tar.gz - Perl script to test signal strength on Speedlan wireless
- equipment (Jeffrey Blank)
-
hopcroft-plugins.tar.gz - Various example plugin scripts contributed by Stanley Hopcroft.
Includes a plugin to check Internet connectivity by checking various
popular search engines, a plugin to check the availability of login
@@ -121,27 +54,7 @@ hopcroft-plugins.tar.gz - Various example plugin scripts contributed by Stanley
search via the web.
(Stanley Hopcroft)
-maser-oracle.tar.gz - This is a modification to the check_oracle plugin script that returns
- the response time in milliseconds. Requires the Oracle tnsping utility.
- (Christoph Maser)
-
radius.tar.gz - Code modifications necessary to make the radexample app
supplied with the radiusclient code work as a RADIUS plugin
for Nagios (Nick Shore)
-vincent-check_radius.tar.gz
- - C program to check RADIUS authentication. Requires the radiusclient
- library available from ftp://ftp.cityline.net/pub/radiusclient/
- (Robert August Vincent II)
- <MOVED TO CORE>
-
-weipert-mysql.tar.gz - C program to check a connection to a MySQL database server, with an
- optional username and password. Requires mysql.h and libmysqlclient
- to compile (Time Weipert)
-
-wright-mysql.tar.gz - Perl script to check MySQL database servers. Requires that mysqladmin(1)
- be installed on the system (included in the MySQL distribution). This
- plugin can accept warning and critical thresholds for the number of threads
- in use by the server (Mitch Wright)
-
-
diff --git a/contrib/tarballs/berger-ping.tar.gz b/contrib/tarballs/berger-ping.tar.gz
index cc58750d..c95b7878 100644
--- a/contrib/tarballs/berger-ping.tar.gz
+++ b/contrib/tarballs/berger-ping.tar.gz
Binary files differ
diff --git a/contrib/tarballs/bowen-langley_plugins.tar.gz b/contrib/tarballs/bowen-langley_plugins.tar.gz
index 6195109f..a9ad1e8c 100644
--- a/contrib/tarballs/bowen-langley_plugins.tar.gz
+++ b/contrib/tarballs/bowen-langley_plugins.tar.gz
Binary files differ
diff --git a/contrib/tarballs/check_bgp-1.0.tar.gz b/contrib/tarballs/check_bgp-1.0.tar.gz
index 9d45c195..0496ddb6 100644
--- a/contrib/tarballs/check_bgp-1.0.tar.gz
+++ b/contrib/tarballs/check_bgp-1.0.tar.gz
Binary files differ
diff --git a/contrib/tarballs/check_breeze.tar.gz b/contrib/tarballs/check_breeze.tar.gz
deleted file mode 100644
index fb5186ef..00000000
--- a/contrib/tarballs/check_breeze.tar.gz
+++ /dev/null
Binary files differ
diff --git a/contrib/tarballs/check_flexlm.tar.gz b/contrib/tarballs/check_flexlm.tar.gz
deleted file mode 100644
index 4ab71441..00000000
--- a/contrib/tarballs/check_flexlm.tar.gz
+++ /dev/null
Binary files differ
diff --git a/contrib/tarballs/check_hltherm.tar.gz b/contrib/tarballs/check_hltherm.tar.gz
deleted file mode 100644
index 7c45cc87..00000000
--- a/contrib/tarballs/check_hltherm.tar.gz
+++ /dev/null
Binary files differ
diff --git a/contrib/tarballs/check_hprsc.tar.gz b/contrib/tarballs/check_hprsc.tar.gz
deleted file mode 100644
index 8998ff83..00000000
--- a/contrib/tarballs/check_hprsc.tar.gz
+++ /dev/null
Binary files differ
diff --git a/contrib/check_memory.tgz b/contrib/tarballs/check_memory.tgz
index b0f80160..b0f80160 100644
--- a/contrib/check_memory.tgz
+++ b/contrib/tarballs/check_memory.tgz
Binary files differ
diff --git a/contrib/tarballs/check_radius.tar.gz b/contrib/tarballs/check_radius.tar.gz
index 70bb08a2..cca6338a 100644
--- a/contrib/tarballs/check_radius.tar.gz
+++ b/contrib/tarballs/check_radius.tar.gz
Binary files differ
diff --git a/contrib/tarballs/check_wave.tar.gz b/contrib/tarballs/check_wave.tar.gz
deleted file mode 100644
index 755be5a9..00000000
--- a/contrib/tarballs/check_wave.tar.gz
+++ /dev/null
Binary files differ
diff --git a/contrib/tarballs/hopcroft-plugins.tar.gz b/contrib/tarballs/hopcroft-plugins.tar.gz
index 0406a743..41ad6db4 100644
--- a/contrib/tarballs/hopcroft-plugins.tar.gz
+++ b/contrib/tarballs/hopcroft-plugins.tar.gz
Binary files differ
diff --git a/contrib/tarballs/radius.tar.gz b/contrib/tarballs/radius.tar.gz
index 022dc3be..41bca5f2 100644
--- a/contrib/tarballs/radius.tar.gz
+++ b/contrib/tarballs/radius.tar.gz
Binary files differ