cancel
Showing results for 
Search instead for 
Did you mean: 

Low Scratch Script

BreezeWJ
Level 2

Hello,

I am looking for a Script or way to monitor our scratch pool to send an alert(email) when remaining available tapes reach a threshold of 8. We are running NB 7.6.0.1.

I am New to the Netbackup world any advice or direction would be appreciated.

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions

revarooo
Level 6
Employee

You will need Opscenter Analytics license for this.

This will count the number of media in the Scratch pool. You need to create a new report and select the "Run SQL Query"

select COUNT (id) from Domain_Media where volumepoolname = 'Scratch'

 

You can then save this report.

Then Goto Reports -> Schedules and setup a new schedule to email this report.

 

View solution in original post

7 REPLIES 7

revarooo
Level 6
Employee
Opscenter? What Is is your master?

dixit47
Level 4

You could monitor scratch tapes with a script running on the master server.  

#!/usr/bin/ksh

scratch=`/usr/openv/volmgr/bin/vmquery -pn Scratch | grep -c "robot slot"`

if [ $scratch -le 10 ]; then
  echo "Current scratch = $scratch tapes" | mailx -s "SCRATCH TAPES LOW - $scratch remaining" abc@company.com
else
  exit
fi

=======================

Hope it will help!! :)

 

BreezeWJ
Level 2

The Master is running windows server2008R2 ;  Robot TLD (0)

and OpsCenter 7.6.1

Opscenter has a report called "Low Scratch" which only monitors all scratch tapes. Is there a way to change it to just look for a specifed number of tapes and then alert via email, or create a new one?

Thanks

 

revarooo
Level 6
Employee

You will need Opscenter Analytics license for this.

This will count the number of media in the Scratch pool. You need to create a new report and select the "Run SQL Query"

select COUNT (id) from Domain_Media where volumepoolname = 'Scratch'

 

You can then save this report.

Then Goto Reports -> Schedules and setup a new schedule to email this report.

 

Michael_G_Ander
Level 6
Certified

I have used

vmquery -pn <scratch pool name> -b | find /c "TLD"

to find the number of scratch tapes on a windows master with a TLD robot

For mail we used blat

 

The standard questions: Have you checked: 1) What has changed. 2) The manual 3) If there are any tech notes or VOX posts regarding the issue

BreezeWJ
Level 2

Thanks this looks like i could use this, we do have the Lic.

Would like to set this up so it does a count of the available scratch tapes in robot type TLD and include an alert when the scratch tapes go below 10 saying.. "Add New Scratch Volumes"

 

what if you have two robots on the same master? how do you modify the script to give you the totals and the output for TLD(0) and TLD(1) ?