Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

job monitoring script for netbackup 7.1

Created: 08 Dec 2012 | 3 comments

Hi All,

We are using netbackup 7.1, I want script for per day job monitoring which one give report ( including restarted job).

Regards,
Vasudev Daxini

Comments 3 CommentsJump to latest comment

Kiran Bandi's picture

Posted in Wrong place...

Post it in NetBackup forums. Here: https://www-secure.symantec.com/connect/backup-and-recovery/forums/netbackup

RamNagalla's picture

hi,

i would suggest you to go with the OpsCenter , its very informative and customizable, and you can get verity of reports., and can be managed multiple master server from one console.

http://www.symantec.com/business/support/index?page=content&id=HOWTO43028

http://www.symantec.com/connect/blogs/opscenter-installation-and-troubleshooting-tutorial-how

you always still have a option to go with script..  i hope someone will provide that.. 

 

 

Andy Welburn's picture

A little late to the party, but if you *do* want a script (& you're running *nix) then I put together the following rough'n'ready script to check for failed jobs overnight (last 24 hours).

Have just amended same so top line actually now creates a list of *all* clients that had a backup in last 24 hours irrespective of their status code (so excuse the continued reference to failed jobs/clients!), it then goes on to list *all* jobs for that client (will include failed jobs & any restarted)

bperror -backstat -U| awk '($1 >= 0) {print $0}'|cut -c8-20|grep -v CLIENT|sort -u > failed_clients
#bperror -backstat -U| awk '($1 > 0) {print $0}'|cut -c8-20|grep -v CLIENT|sort -u > failed_clients
#bperror -backstat -U| awk '($1 > 1) {print $0}'|cut -c8-20|grep -v CLIENT|sort -u > failed_clients
if [ ! -s /app/site/scripts/failed_clients ]
then
  echo "No clients have had any failed jobs in the last 24 hours"
  rm failed_clients
  exit
fi
echo "The following clients have had one or more failed jobs in the last 24 hours"
echo "***************************************************************************"
echo
cat failed_clients|
while read CLIENT
do
  echo
  echo "JOBS RUN FOR CLIENT $CLIENT"
  echo "*********************************"
  bperror -backstat -client $CLIENT| cut -d " " -f6 | sort -u > failed_jobid
  cat failed_jobid|
        while read JOB_ID
        do
                echo
                echo "JOB_ID $JOB_ID"
                bperror -backstat -U -jobid $JOB_ID
        done
done
rm failed_clients
rm failed_jobid

 

An example of the output to show restarted job:

JOBS RUN FOR CLIENT client1
*********************************

JOB_ID 1255429
STATUS CLIENT     POLICY     SCHED      SERVER   TIME COMPLETED
  0    client1    Policy1    Schedule1  master   12/17/2012 22:11:01

JOB_ID 1255442
STATUS CLIENT     POLICY     SCHED      SERVER   TIME COMPLETED
  0    client1    Policy2    Schedule2  master   12/18/2012 05:56:21

JOB_ID 1255443
STATUS CLIENT     POLICY     SCHED      SERVER   TIME COMPLETED
  0    client1    Policy2    Schedule2  master   12/18/2012 05:50:43

JOB_ID 1255444
STATUS CLIENT     POLICY     SCHED      SERVER   TIME COMPLETED
 24    client1    Policy2    Schedule2  master   12/18/2012 05:23:49
                 (socket write failed)
  0    client1    Policy2    Schedule2  master   12/18/2012 05:56:20