nv-l
[Top] [All Lists]

AW: tme10 [DM] Monitoring TCP/IP Ports

To: nv-l@lists.tivoli.com
Subject: AW: tme10 [DM] Monitoring TCP/IP Ports
From: "Gerlach, Ingo" <Ingo.Gerlach@gedas.de>
Date: Mon, 16 Oct 2000 09:06:24 +0200
>Is there a way in Netview, DM, or one of the PLUS modules to monitor 
>whether
>a TCP/IP port is open or not?. Thanks, Ray
> >

Hello Martyn,

for a few day's before, i find a script from Leslie Clark that 
check a Port  with netcheck.
I've a little modyfied this to generate a Trap.

Ingo 
.

#!/bin/ksh
# FTP Dienste pruefen
# ftp_serv.sh
# 1.1 ige / 10.10.00  , Anpassung zur Feststellung der richtigen Portadresse
#
# 1.0 IBM Leslie Clark , netcheck !!!
#set -x 

LOGFILE=/usr/OV/as/log/ftp_error.log
PORT=21

NVHOST="netview.yourdomain.com"

while [ 1 ]  
do
DATE=`date`
 echo "FTP-Service check gestartet $DATE" >> $LOGFILE
 FTPSERVERS=`nvUtil l isFTP` 
 for i in $FTPSERVERS;
 do
 OUT=`/usr/OV/bin/netcheck -o tcpPort=$PORT -t tcp $i | grep OK | wc -l`;
 if [ $OUT -eq "0" ]; then
   echo "$i FTP-Service DOWN (Port: $PORT)" >> $LOGFILE
   /usr/OV/bin/snmptrap $NVHOST .1.3.6.1.4.1.9999 $i 6 2 0 \
   .1.3.6.1.4.1.9999.0 octetstring "FTP-Service check" \
   .1.3.6.1.4.1.9999.1 octetstring $i \
   .1.3.6.1.4.1.9999.2 octetstring "FTP-Service" \
   .1.3.6.1.4.1.9999.3 octetstring "Port:$PORT" \
   .1.3.6.1.4.1.9999.4 octetstring "down"
 fi ;
 done

sleep 600


<Prev in Thread] Current Thread [Next in Thread>
  • AW: tme10 [DM] Monitoring TCP/IP Ports, Gerlach, Ingo <=

Archive operated by Skills 1st Ltd

See also: The NetView Web