Jabber message newlines --and-- notify_via_jabber patch for ssl

DTerrell at Delphi-Tech.com DTerrell at Delphi-Tech.com
Wed Dec 17 21:01:19 CET 2003


I recently read the post about notify-via-jabber and went to impliment it
immediately.  A small note is how would I be able to insert new lines into
the message instead of having one long sentence?

Also, I use SSL enabled Jabber and noticed there wasn't support in the perl
script for it.  Simple patch is:

--- notify_via_jabber   2003-12-17 14:24:40.000000000 -0500
+++ notify_via_jabber1  2003-12-17 14:25:09.000000000 -0500
@@ -32,9 +32,10 @@
 use constant RESOURCE  => 'resource';
 use constant MESSAGE   => $ARGV[1];
 use constant MAXWAIT   => 2 ;
+use constant SSL       => 1;

 my $connection = Net::Jabber::Client->new();
-$connection->Connect( "hostname" => SERVER,"port" => PORT )  or die
+$connection->Connect( "hostname" => SERVER,"port" => PORT,"ssl" => SSL )
or die
 "Cannot connect ($!)\n";

 my @result = $connection->AuthSend( "username" => USER,"password" =>

of course, you'll also have to make sure the port is changed properly, SSL
can be 1 or 0 (go figure).

Thanks,

> ________________________ 
> David A. Terrell
> MIS Engineer, RHCE, A+
> Delphi Technology, Inc. 
> Cambridge, MA 02139
> 617-494-8361 x2024
> 
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list