[smokeping-users] Possible modification to EchoPingSmtp

Bill Earle bill at buffalo.edu
Wed Feb 9 22:31:55 MET 2005


Hey folks,

I have submitted a patch for echoping to allow alternate
SMTP ports to be monitored. I have a modified version of
EchoPingSmtp that uses this feature.


Here is a diff for anyone interested:

*** EchoPingSmtp.pm     2003-03-20 17:06:15.000000000 -0500
--- EchoPingSmtpPort.pm 2005-02-09 15:01:58.000000000 -0500
***************
*** 1,8 ****
! package probes::EchoPingSmtp;

  =head1 NAME

! probes::EchoPingSmtp - an echoping(1) probe for SmokePing

  =head1 OVERVIEW

--- 1,8 ----
! package probes::EchoPingSmtpPort;

  =head1 NAME

! probes::EchoPingSmtpPort - an echoping(1) probe for SmokePing

  =head1 OVERVIEW

***************
*** 11,22 ****
  =head1 SYNOPSYS

   *** Probes ***
!  + EchoPingSmtp

   binary = /usr/bin/echoping # mandatory

   *** Targets ***
!  probe = EchoPingSmtp

  =head1 DESCRIPTION

--- 11,30 ----
  =head1 SYNOPSYS

   *** Probes ***
!  + EchoPingSmtpPort

   binary = /usr/bin/echoping # mandatory

   *** Targets ***
!  probe = EchoPingSmtpPort
!
!  + PROBE_CONF
!  port = 25 # default value anyway
!
! =item port
!
! The TCP port to use. The default is 25.
!

  =head1 DESCRIPTION

***************
*** 48,53 ****
--- 56,74 ----
        delete $arghashref->{fill};
  }

+ # tag the port number after the hostname
+ sub make_host {
+         my $self = shift;
+         my $target = shift;
+
+         my $host = $self->SUPER::make_host($target);
+         my $port = $target->{vars}{port};
+         $port = $self->{properties}{port} unless defined $port;
+
+         $host .= ":$port" if defined $port;
+         return $host;
+ }
+
  sub proto_args {
        return ("-S");
  }




- Bill


   William B. Earle	Computing & Information Technology
			University at Buffalo
Voice: 716.645.6580	301 Computing Center
Fax:   716.645.5972	Buffalo, NY 14260



--
Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the smokeping-users mailing list