From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/117526-cel.diff | 71 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 web/attachments/117526-cel.diff (limited to 'web/attachments/117526-cel.diff') diff --git a/web/attachments/117526-cel.diff b/web/attachments/117526-cel.diff new file mode 100644 index 0000000..f205f63 --- /dev/null +++ b/web/attachments/117526-cel.diff @@ -0,0 +1,71 @@ +*** /tools/nagios/libexec/check_email_loop.pl.orig Fri Jan 28 08:08:29 2005 +--- /tools/nagios/libexec/check_email_loop.pl Fri Jan 28 08:38:01 2005 +*************** +*** 42,51 **** + my $state = "UNKNOWN"; + my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost); + my ($poptimeout,$smtptimeout,$pinginterval)=(60,60,5); +! my ($lostwarn, $lostcrit,$pendwarn, $pendcrit); + + # Internal Vars + my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); + my ($matchcount,$statfile) = (0,"check_email_loop.stat"); + + # Subs declaration +--- 42,52 ---- + my $state = "UNKNOWN"; + my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost); + my ($poptimeout,$smtptimeout,$pinginterval)=(60,60,5); +! my ($lostwarn, $lostcrit,$pendwarn, $pendcrit, $debug); + + # Internal Vars + my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); ++ my(%other_smtp_opts); + my ($matchcount,$statfile) = (0,"check_email_loop.stat"); + + # Subs declaration +*************** +*** 65,70 **** +--- 66,72 ---- + my $status = GetOptions( + "from=s",\$sender, + "to=s",\$receiver, ++ "debug", \$debug, + "pophost=s",\$pophost, + "popuser=s",\$popuser, + "passwd=s",\$poppasswd, +*************** +*** 101,108 **** + my $serial = time(); + $serial = "ID#" . $serial . "#$$"; + + # sending new ping email +! my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout) + || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); + ($smtp->mail($sender) && + $smtp->to($receiver) && +--- 103,116 ---- + my $serial = time(); + $serial = "ID#" . $serial . "#$$"; + ++ + # sending new ping email +! %other_smtp_opts={}; +! if ( $debug == 1 ) { +! $other_smtp_opts{'Debug'} = 1; +! } +! +! my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout, %other_smtp_opts) + || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); + ($smtp->mail($sender) && + $smtp->to($receiver) && +*************** +*** 216,221 **** +--- 224,230 ---- + print " -lostcrit=num CRITICAL \n"; + print " -pendwarn=num WARNING-state if more than num pending emails\n"; + print " -pendcrit=num CRITICAL \n"; ++ print " -debug send SMTP tranaction info to stderr\n"; + print " Options may abbreviated!\n"; + print " LOST mails are mails, being sent before the last mail arrived back.\n"; + print " PENDING mails are those, which are not. (supposed to be on the way)\n"; -- cgit v1.2.3-74-g34f1