Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated running of scripts on savegroup completion 2

Status
Not open for further replies.

pluscarden

Programmer
Jan 26, 2004
26
GB
I want to write a UNIX script that will sit on a Legato server and automatically run each time a savegroup is completed. Is it possible to configure Legato to do this?

If so, what would I need to put in my script to obtain details about the group that has just completed...group name, start time, end time, saveset details (failures/ successes),etc.?

The upshot of all this is that I want to be able to notify each client in the group as to the success/failure of its backup (via some kind of passive checking routine), so it can be highlighted on a Nagios web screen. If anybody else has already done something similar and could point me in the right direction that would be even better.

 
Yes, you can do this by extending the action command in the
savegroup notification. Any script can be executed.

By default, the "savegroup completion report" is mailed to the root user.
It is better to save it to a file for your purpose. I have been told
that you can do this using the logger command. Unfortunately,
i cannot provide you a script.
 
Hi all,

I have a routine that when the group stops it will run a program which dumps the completion report onto a file.
At a time during the day this is then looked at by a script and a report generated from it here is a sample of the email I receve every day.


-----------------------------------------------------------

NetWorker Savegroup: (notice) NTAppData completed, 3 client(s) (All Succeeded)
Start time: Sat Jan 31 02:00:00 2004
End time: Sat Jan 31 16:59:24 2004
NetWorker Savegroup: (notice) BOM-SUNOracleData completed, 5 client(s) (All Succeeded)
Start time: Sat Jan 31 20:00:00 2004
End time: Sat Jan 31 20:00:01 2004
NetWorker Savegroup: (notice) BOM-SUNAppData completed, 15 client(s) (All Succeeded)
Start time: Sat Jan 31 20:00:00 2004
End time: Sat Jan 31 20:00:03 2004
NetWorker Savegroup: (notice) BOM-NTSystemData completed, 9 client(s) (All Succeeded)
Start time: Sat Jan 31 22:00:00 2004
End time: Sat Jan 31 22:00:02 2004
NetWorker Savegroup: (notice) NTAppData completed, 3 client(s) (All Succeeded)
Start time: Sun Feb 1 02:00:00 2004
End time: Sun Feb 1 02:00:01 2004

#######################################################
# Unsuccsessful & Warnings Save Sets Report
######################################################

And a load more data....

FernandezD
At your service.
Unix systems Admin
 
OOOPS

This any good for you... The script can be altered to produce HTML if you like.



FernandezD
At your service.
Unix systems Admin
 
Excellent! That looks like the kind of thing I might be looking for. Would it be possible to have a look at your scripts to get a rough idea how it all works?
 
"I want to be able to notify each client in the group as to the success/failure of its backup"

If this is what you need, then why not set up the owner notification field in the each client resource? As mentioned in tech bulletin 287:

"NetWorker can send email to different users or groups regarding the status of an individual machine. For example, if you have 10 servers, and each server is managed by a different person, administrators should receive email regarding the status of the backup of their servers, but not the status of other administrators' servers."

What will be sent as a result of this is the savegroup completion report each client only.


To implement this feature, start NetWorker Administrator. Then (the following is a windows example):

- Make sure you a can see the hidden attributes by selecting: Options, Customize, Display Hidden Attributes, OK

- Edit a client

- Click on the Preference Tab, You will see the field: Owner notification. In this field, you can tell it to send an email notification with something like:

smtpmail -s "Client_name Backup" -h smtp_host receipiant's-email-address

- Click ok to save


Replace smtpmail with whatever email utility you use on the backup server.



Refer to the following for further information:


LEGATO TECHNICAL BULLETIN 287: Setting Up Email Notifications on NetWorker Servers (NT)

thread480-36516
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top