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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pushing out daily report via email?

Status
Not open for further replies.

davevail

Programmer
Mar 16, 2002
24
US
Hi all - we are running NW 7.2.2 and I have the 7.3 GUI - I need to push out a daily GROUP summary report to a user via email. Does anyone have any suggestions as to a simple way to do this without manually sending an email daily? Thanks!
 
Hi,

here is an example how we dit it...

In the notifications we have a entry for savegroup completion report and inside we call this script:

#!/bin/sh
# set -x
# This script is desinged to send an e-mail if (All Succeeded)
# is missing within a savegroup completion report in addition
# to the generally message logging.
#
# enter the path to this file and filename in the networker
# Savegroup Completion notification:
#
# /nsr/scripts/savegrpcomp.sh

AWK=/usr/xpg4/bin/awk
TMP="/tmp/`basename $0`.$$"
LOGFILE="/nsr/logs/savegrp.log"
MAILCMD="/usr/bin/mailx"
GREP="/usr/bin/egrep"
MAILTO="user@domain.xx"
ERRTO="user@domain.xx"
MSG='--- Unsuccessful Save Sets ---'
MAILSUBJECTOK="Backup OK"
MAILSUBJECTERR="!!! Error!!!"

cat > $TMP
cat $TMP >> $LOGFILE

# Get the group name and reason out of the message
GROUP=`head -4 $TMP | $GREP "NetWorker savegroup:" | sed -e 's/, total.*//' -e 's/^.*) //'`

$GREP -e "$MSG" < $TMP > /dev/null 2>&1
if [ $? -eq 0 ]
then
# Fehler
mailx -s "${GROUP}: $MAILSUBJECTERR" "$ERRTO" "$MAILTO" < $TMP
else
# Alles OK
mailx -s "${GROUP}: $MAILSUBJECTOK" "$MAILTO" < $TMP
fi
rm $TMP

# Manage the logfile
logadm -c -z 0 ${LOGFILE}


Cheers Novelli
Novell Master CNE + CDE
EMC Networker LCNS
 
Hi, there are some procedure or script for Windows 2003?

Thanks, Marco
 
Hi Marco

We use the freeware tool blat! under W2K3 ( to get a detaliled daily backup report of each client.
After installation and testing the connectivity to your mail server according to the command line reference guide just enter the the command line with the appropriate blat commant into the "owner notification" field of the client resource.
Hope it helps

cheers Till

[lightsaber]
 
Novelli,

this script for AIX, only is different in LOGFILE var that will need to be with "daemon.lo" value ?

Thks
 
Novelli,

this script for AIX, only is different in LOGFILE var that will need to be with "daemon.log" value ?

Thks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top