sending notifications to windows instant messenger

Neil neil-on-nagios at restricted.dyndns.org
Mon Jun 28 19:15:45 CEST 2004


I found out that those scripts will not work for our setup. We are using 
Microsoft Exchange Instant Messaging server. It uses Rendezvous 
Protocol(RVP). I have actually found a perl module which implements RVP 
(net-rvp). It comes with an axample when you extract the source called 
client.pl. 

I tried it and actually saw our Exchange server replied to my request. But 
debug.log keeps telling that the object(my name) has been moved to another 
server. Then it just drops me off. :( 

I'm almost close. I send an email to the developer but I still haven't 
gotten any response yet. 

Andy Harrison writes: 

> On Fri, 25 Jun 2004 15:03:21 -0500, Neil
> <neil-on-nagios at restricted.dyndns.org> wrote:
>> 
>> Hey guys, 
>> 
>> has anyone of you successfully implemented sending of notification to a
>> Windows Instant Messenger? If so, can you send some links on how I can
>> implement it. I found answers in Nagios FAQ but only for AOL and Yahoo
>> Messenger. 
>> 
> 
> Likely you could retool one of the scripts for aim and others to work.
>  The Net::MSN perl module would probably be helpful in this. 
> 
> http://search.cpan.org/~djr/Net-MSN-1.022/ 
> 
> 
> I wrote this just to test sending myself an aim message.  Might be a
> place to start, assuming Net::OSCAR is similar to Net::MSN. 
> 
> #!/usr/local/bin/perl -w
> #
> # Created: 09/23/03 09:29:18 EDT by Andy Harrison
> #
> # Send an AOL Instant Message to the specified screen name
> #
> # Usage:  
> # 
> #    imtest.andy --sn=ScreenName --pw=Password \
> #    --msg=\"Some Message\" --rcpt=Recipient \
> #    [--v]
> #
> # $Id$ 
> 
> use strict;
> use Net::OSCAR qw(:standard); 
> use Getopt::Long; 
> 
> $SIG{CHLD} = 'IGNORE';
> $SIG{PIPE} = 'IGNORE'; 
> 
> use vars qw( $opt_screenname $opt_passwd $opt_message $opt_recipient ); 
> 
> GetOptions ( 
>     'sn=s'     => \$opt_screenname, 
>     'pw=s'     => \$opt_passwd, 
>     'msg=s'    => \$opt_message,
>     'rcpt=s'   => \$opt_recipient
>     'v!'       => \$opt_verbose
> ); 
> 
> 
> unless ( $opt_screenname && $opt_passwd && $opt_message ) {
>         die "usage: $0 --sn=ScreenName --pw=Password --msg=\"Some
> Message\" --rcpt=Recipient\n";
> } 
> 
> my $oscar = Net::OSCAR->new; 
> 
> #$oscar->loglevel(9);
> $oscar->set_callback_error(
>         sub {
>                 my($oscar, $connection, $error, $description, $fatal) = @_;
>                 die "Error $error: $description\n";
>         }
> ); 
> 
> $oscar->set_callback_signon_done(
>         sub {
>                 my $oscar = shift;
>                 print "Signon completed.\n" if $opt_verbose;
>                 $oscar->send_im($opt_recipient, $opt_message) 
>                         or die ( "unable to send message\n" );
>                 print "Message sent\n" if $opt_verbose;
>                 $oscar->signoff or die ( "problem signing off\n" );
>                 print "Signed off\n" if $opt_verbose;
>                 exit;
>         }
> ); 
> 
> print "Signing on...\n" if $opt_verbose;
> $oscar->signon($opt_screenname, $opt_passwd) or die "Unable to sign on\n";
> while(1) { 
>     $oscar->do_one_loop; 
> } 
> 
> print "Complete...\n" if $opt_verbose; 
> 
> -- 
> Andy Harrison
 


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
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