From 6c89839b7fc344608e61c8916ac9d9925fa98d14 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 5 Oct 2012 06:46:27 +0200 Subject: Monitoring/\* --> nagios/ --- Monitoring/plugins/sendmailservices.pl | 105 --------------------------------- 1 file changed, 105 deletions(-) delete mode 100755 Monitoring/plugins/sendmailservices.pl (limited to 'Monitoring/plugins/sendmailservices.pl') diff --git a/Monitoring/plugins/sendmailservices.pl b/Monitoring/plugins/sendmailservices.pl deleted file mode 100755 index ab5464cf..00000000 --- a/Monitoring/plugins/sendmailservices.pl +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/perl -use MIME::QuotedPrint; -use HTML::Entities; -use Mail::Sendmail 0.75; # doesn't work with v. 0.74! - -$NOTIFICATIONTYPE=$ARGV[0]; -$SERVICEDESC=$ARGV[1]; -$HOSTNAME=$ARGV[2]; -$HOSTADDRESS=$ARGV[3]; -$SERVICESTATE=$ARGV[4]; -$SHORTDATETIME=$ARGV[5]; -$SERVICEOUTPUT=$ARGV[6]; -$TO=$ARGV[7]; -#$HOSTNAME=$ARGV[8]; - -$boundary = "====" . time() . "===="; - -$text = "***** Notification Shinken *****\n\n" - . "Notification : $NOTIFICATIONTYPE\n\n" - . "Impacted service : $SERVICEDESC\n" - . "State : $SERVICESTATE\n\n" - . "Related host : $HOSTNAME\n" - . "Address : $HOSTADDRESS\n" - . "Date/Time : $SHORTDATETIME\n\n" - . "Service output : $SERVICEOUTPUT"; - -$texthtml = "
$NOTIFICATIONTYPE\n\n" - . "Impacted service : $SERVICEDESC\n" - . "State : ', - to => $TO, - subject => "$SERVICEDESC $SERVICESTATE on $HOSTNAME", - 'content-type' => "multipart/alternative; boundary=\"$boundary\"", - 'Auto-Submitted' => "auto-generated" - ); - -$plain = encode_qp $text; - -#$html = encode_entities($texthtml); -$html = $texthtml; -$html =~ s/\n\n/\n\n

/g; -$html =~ s/\n/
\n/g; -$html = "

" . $html . "

"; - -$boundary = '--'.$boundary; - - -$mail{body} = <$html -$boundary-- -END_OF_BODY - -sendmail(%mail) || print "Error: $Mail::Sendmail::error\n"; - -- cgit v1.2.3