02-04-2015 11:36 PM
Hi,
Setup:
NBU: 7.6.0.3
OS: Windows 2008
We are running different set of policies with multistreaming and some without.I would like to configure alert only for parent job failed notification.
I am getting alerts for all streams which is not required... can someone plz help...
Solved! Go to Solution.
02-06-2015 01:17 PM
I consistantly named the parent job schedule "Parent.Job" and my child schedules "Child.Job"
I added logic to my "backup_exit_notify" scipt in the bin directory - under these lines:
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares
I do NOT want an email if the error code is 0, 1, 71, 150, 800 or 191; and I do not want an email for a Child.Job, based on the backup type, I email the appropriate group
if [ $5 != 0 -a $5 != 1 -a $5 != 71 -a $5 != 150 -a $5 != 800 -a $5 != 191 -a $3 != "Child.Job" ]
then
if /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Window
then
cat $OUTF | /usr/bin/mailx -s "WINDOWS NetBackup Error Status $5, Policy $2, Client $1" \
operations windows
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Exchange
then
cat $OUTF | /usr/bin/mailx -s "EXCHANGE NetBackup Error Status $5, Policy $2, Client $1" \
operations windows
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep VMWARE
then
cat $OUTF | /usr/bin/mailx -s "VMWARE NetBackup Error Status $5, Policy $2, Client $1" \
operations windows
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-SQL
then
cat $OUTF | /usr/bin/mailx -s "MS-SQL NetBackup Error Status $5, Policy $2, Client $1" \
operations windows dba
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Oracle
then
cat $OUTF | /usr/bin/mailx -s "ORACLE NetBackup Error Status $5, Policy $2, Client $1" \
operations dba unix
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Sybase
then
cat $OUTF | /usr/bin/mailx -s "SYBASE NetBackup Error Status $5, Policy $2, Client $1" \
operations dba unix
else
cat $OUTF | /usr/bin/mailx -s "UNIX NetBackup Error Status $5, Policy $2, Client $1" \
operations unix
fi
fi
02-04-2015 11:59 PM
Then you need to configure parent_end_notify script on the master.
See http://www.symantec.com/docs/HOWTO106055
02-05-2015 12:23 AM
Thanks for your reply... the script is in bin folder... parent_end_called folder is getting updated everytime the backup completes. But i am not getting an email with the information...
Note: I am getting email from backup_exit_notify script if i enable it...
02-05-2015 12:39 AM
Have you had a look at the contents of the script?
Can you see in bin directory if $OUTF is created?
OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED
The email section of the script is commented out - you need to customize it:
#
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares
02-05-2015 01:15 AM
As i mentioned earlier, Yes OUTF is getting created...
i tried the following.. i replaced the following line
@call %NB_MAIL_SCRIPT% someone_who_cares "NetBackup backup exit" %OUTF%
to
SendEmail
blat %OUTF% -s %1:%7 -t xxxx@company.com -i NetBackup
-server mail.relay.com -q
But it didnt worked..
I tried
call %NB_MAIL_SCRIPT% xxxx.@company.com "NetBackup backup exit" %OUTF%
No luck
02-05-2015 01:58 AM
Yes, output file is getting created...
How can i use the following in windows... Can u share the syntax plz..
cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares
02-05-2015 02:07 AM
I unfortunately do not have access to a Windows master.
Hopefully someone with a Windows master can help here....
02-05-2015 02:19 AM
If you run listpaths.exe from the goodies directory does it show the correct value for NB_MAIL_SCRIPT?
You could just try :
@call nbmail.cmd aaa@company.com "NetBackup parent end notify" %OUTF%
Of course make sure that you nbmail script is all OK
02-05-2015 02:38 AM
Hi Mark,
Thanks for your reply... but no luck...:(
NB_MAIL_Script shows correct value...
I used below one for backup_EXIT_notify which works fine..
:SendEmail
blat %OUTF% -s %1:%5 -t aaa@company.com -i NetBackup
-server mail.relay.com -q
02-05-2015 02:40 AM
No luck mark.. :(
Yes, nb_mail_script shows correct value...
i used the following for backup_exit_notify which works fine...
:SendEmail
blat %OUTF% -s %1:%5 -t mailID -i NetBackup
-server mail.relay.com -q
02-05-2015 03:25 AM
I assume if you have many jobs which have parent jobs you are pinning this down based on policy name (parent_end_notify.policyname.bat) otherwise it may never finish as such?
Have you tried it explicitly.
blat PARENT_END_CALLED.policyname -s %1:%5 -t mailID -i NetBackup -server mail.relay.com -q
02-06-2015 01:17 PM
I consistantly named the parent job schedule "Parent.Job" and my child schedules "Child.Job"
I added logic to my "backup_exit_notify" scipt in the bin directory - under these lines:
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares
I do NOT want an email if the error code is 0, 1, 71, 150, 800 or 191; and I do not want an email for a Child.Job, based on the backup type, I email the appropriate group
if [ $5 != 0 -a $5 != 1 -a $5 != 71 -a $5 != 150 -a $5 != 800 -a $5 != 191 -a $3 != "Child.Job" ]
then
if /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Window
then
cat $OUTF | /usr/bin/mailx -s "WINDOWS NetBackup Error Status $5, Policy $2, Client $1" \
operations windows
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Exchange
then
cat $OUTF | /usr/bin/mailx -s "EXCHANGE NetBackup Error Status $5, Policy $2, Client $1" \
operations windows
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep VMWARE
then
cat $OUTF | /usr/bin/mailx -s "VMWARE NetBackup Error Status $5, Policy $2, Client $1" \
operations windows
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-SQL
then
cat $OUTF | /usr/bin/mailx -s "MS-SQL NetBackup Error Status $5, Policy $2, Client $1" \
operations windows dba
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Oracle
then
cat $OUTF | /usr/bin/mailx -s "ORACLE NetBackup Error Status $5, Policy $2, Client $1" \
operations dba unix
elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Sybase
then
cat $OUTF | /usr/bin/mailx -s "SYBASE NetBackup Error Status $5, Policy $2, Client $1" \
operations dba unix
else
cat $OUTF | /usr/bin/mailx -s "UNIX NetBackup Error Status $5, Policy $2, Client $1" \
operations unix
fi
fi