[hobbit] Monitor for client TSM-Backup

Lund, Holly holly.lund at hq.doe.gov
Fri Jan 4 17:49:46 CET 2008


 
Martin

this is what I use for my monitoring

cron ran script on same day backup is completed 

#/bin/sh

#  Get data from tivoli dsmsched.log for use by Hobbit client for backup
mon
itoring

grep  `date '+%m/%d/%y'` /opt/tivoli/tsm/client/ba/bin/dsmsched.log  |
grep -v S
ent|grep -v Changed > /opt/hobbit/client/tmp/tsmoutput

chown hobbit:nobody /opt/hobbit/client/tmp/tsmoutput


script ran by hobbit client

#/bin/sh
#
# Leif Gustafsson
# Giga Consulting AB
# 2002-07-04 Initial
# 2002-07-05 Status Started for backup is NOT a fault
#            and some nicer code. I will do some more
#            during the vacation
#
COLUMN=backup   # Name of the column
COLOR=green          # By default, everything is OK
MSG="TSM backups complete"

BBHOME=/opt/hobbit/client


#. $BBHOME/etc/bbdef.sh

LOG_HOME=/opt/hobbit/client/tmp
HOSTNAME=`/bin/hostname`

LOGFILE="$LOG_HOME/tsmevent_$HOSTNAME"
OUTFILE="$LOG_HOME/tsmoutput"
TMPFILE="$LOG_HOME/tsmtmp_$HOSTNAME"
NBFILE="$LOG_HOME/tsmnb_$HOSTNAME"
TFFILE="$LOG_HOME/tsmtransfer_$HOSTNAME"
PROCFILE="$LOG_HOME/tsmproctime_$HOSTNAME"

cp /dev/null $NBFILE
cp /dev/null $TFFILE
cp /dev/null $PROCFILE

echo "\n" > $NBFILE
grep  -i "Network data transfer rate" $OUTFILE >> $NBFILE

echo "\n" > $TFFILE
grep -i "Data transfer time" $OUTFILE >> $TFFILE

echo "\n" > $PROCTIMEFILE
grep -i "Elapsed Processing Time"  $OUTFILE >> $PROCFILE

echo "\n" > $LOGFILE
grep -i "Successful incremental backup" $OUTFILE >> $LOGFILE
grep -i fail $OUTFILE >> $LOGFILE
grep -i "Completed successfully" $OUTFILE >> $LOGFILE
if [ $? = 1 ]
then
        COLOR=yellow
        $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
        MSG=status $MACHINE.backup yellow Problems with backup. Please
check /op
t/tivoli/tsm/client/ba/bin/dsmsched.log` cat $LOGFILE` `cat $NBFILE`
`cat $TFFIL
E` `cat $PROCFILE`"
else
       $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
        MSG=status $MACHINE.backup green Backup was successful `cat
$LOGFILE` `c
at $NBFILE` `cat $TFFILE` `cat $PROCFILE`"
fi
echo "message is" $MSG
exit 0


give this ouptut

 Backup was successful

01/04/08   02:13:38 Successful incremental backup of '/boot'
01/04/08   02:14:48 Successful incremental backup of '/home'
01/04/08   02:16:14 Successful incremental backup of '/var'
01/04/08   02:17:02 Successful incremental backup of '/opt'
01/04/08   02:24:07 Successful incremental backup of '/usr'
01/04/08   02:24:33 Successful incremental backup of '/'
01/04/08   02:24:34 Total number of objects failed:           0
01/04/08   02:24:34 Scheduled event 'EARLYAM-WD' completed successfully.

01/04/08   02:24:34 Network data transfer rate:        120,398.69 KB/sec

01/04/08   02:24:34 Data transfer time:                    0.07 sec 
01/04/08   02:24:34 Elapsed processing time:           00:11:11





Holly Lund
301-903-1174
202-586-4431

-----Original Message-----
From: Martin Flemming [mailto:martin.flemming at desy.de] 
Sent: Friday, January 04, 2008 9:14 AM
To: hobbit at hswn.dk
Subject: [hobbit] Monitor for client TSM-Backup


Hi !

I want to monitor the tsm-backup on my clients ...

... and i myself be not the Scripting-master :-(

Any help or scripts are much appreciated

cheers,

       Martin 


______________________________________________________
Martin Flemming
DESY / IT          office : Building 2b / 008a
Notkestr. 85       phone  : 040 - 8998 - 4667
22603 Hamburg      mail   : martin.flemming at desy.de
______________________________________________________

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk







More information about the Xymon mailing list