Forum Discussion

BreezeWJ's avatar
BreezeWJ
Level 2
10 years ago

Low Scratch Script

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

 

  • 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.

     

7 Replies

  • 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"

     

  • 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

     

  • 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.

     

  • 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

     

  • 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!! :)

     

    • kristallia's avatar
      kristallia
      Level 1

      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) ?