ADSM-L

Re: Is there a way to email notifications in TSM?

2002-03-22 11:43:00
Subject: Re: Is there a way to email notifications in TSM?
From: "Martin, Jon R." <jrmartin AT KNS DOT COM>
Date: Fri, 22 Mar 2002 11:39:24 -0500
Etienne,

        Here is something similar that I do on my AIX Server.  It could
probably be written differently (better) but it serves the purpose.  It
checks if any of three different messages are in the log and if so mails
that information to me.

Thanks,
Jon Martin

##########################
#!/usr/bin/ksh
#This script reviews the TSM Activity log on a daily basis and forward
information on tape volume and or tape drive failures during the previou
s 24 hour
#period.  This output is then e-mail to account specified by the EMAIL
variable.

EMAIL='jrmartin AT kns DOT com'

if [[ -f /tmp/tapefail_chk.out ]]
        then
        rm /tmp/tapefail_chk.out
fi

dsmadmc -id=XXXX -password=XXXX 'q actlog begind=-1 msgno=8359' >> /dev/null
        if [ $? = 0 ]
        then
        dsmadmc -id=XXXX -password=XXXX 'q actlog begind=-1 msgno=8359' >>
/tmp/tapefail_chk.out
        fi

dsmadmc -id=XXXX -password=XXXX 'q actlog begind=-1 msgno=8302' >> /dev/null
        if [ $? = 0 ]
        then
        dsmadmc -id=XXXX -password=XXXX 'q actlog begind=-1 msgno=8302' >>
/tmp/tapefail_chk.out
        fi


dsmadmc -id=XXXX -password=XXXX 'q actlog begind=-1 msgno=8778' >> /dev/null
        if [ $? = 0 ]
        then
        dsmadmc -id=XXXX -password=XXXX 'q actlog begind=-1 msgno=8778' >>
/tmp/tapefail_chk.out
        fi



if [[ -f /tmp/tapefail_chk.out ]]
        then
        mail -s "TSM Tape Error Report" $EMAIL < /tmp/tapefail_chk.out
fi
#####################33