cancel
Showing results for 
Search instead for 
Did you mean: 

Issues about Email Notifications

Ivy_Yang
Level 6

I have an issue about Email Notifications.

I configured email notifications on all of our backup domains(9 backup domain in total including 6.5.4,7.0,7.1)...and it work well.

but yerterday I found that there is an issue in one of the backup domain.

Netbackup Version::VERSION NetBackup 7.0 running on  LINUX_RH_X86

I configured email notification months ago via Java admin GUI and I indeed received some alerts for the failed jobs so I thought it's okay!

but I found yerterday it sends alerts only for 4 specific backup policies as below since I didn't receive any alerts for the yerterday's NDMP 99 error.
awodssqlvs_sql_db
awodssqlvs_sql_trans
awoltpsqlvs_sql_db
awoltpsqlvs_sql_trans

The policies above are relating to 2 clients AWOLTPSQLVS  and AWODSSQLVS. Both of them are the virthual name for MSSQL 2-node clusters.

and I made some test also by terminating the running jobs manually and it sent alert for these 4 policies only. 

I understand that it is supposed to send email notification for all the non-zero backup status..not for some specific backup policies.......

and I don;t find any issue for email notifications  in other backup domains  so far.

is there anybody who came across the same issue or know how to solve it ?

thanks very much in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

Ivy_Yang ...someone_who_cares should read you@yourdomain.com (i.e. your email address) did you change that?

watsons .... ndmp use their own set of scripts - you can add an ndmp_end_notify(.bat) to the netbackup bin directory to send out your mail - see the NDMP admin Guide "Using Scripts" section.

Hope this helps

View solution in original post

21 REPLIES 21

Ivy_Yang
Level 6

by the way I configured policy alerts for these 4 policies on Opscenter.....

this is the only difference with other backup domainws I can figure out why email notification only works for these 4 policies instead of all non-zero backup status.............

but when I delete the policy alerts from opscenter and restarted the NBU service on NBU master....

the email notifications still doesn't work  ..

for example, I terminated 2 jobs manually as below but only received 1 alert .........

watsons
Level 6

I don't know about OpsCenter so I can't comment on that.

For netbackup email notification, you didn't tell us how you configure it - could the alerts you received are actually from OpsCenter, while netbackup did not send it at all? 

In master server host properties, do you use "server send email" or "client send email"?

Ivy_Yang
Level 6

hi, Watsons

sorry I dropped the ball.

I received the alerts from both OpsCenter and netbackup. After I deleted the policy alert from opscenter I can receive the alert from netbackup ,but only for those 4 policies.

 

I used "server send email"::

java admin GUI---->Netbackup Management----->Host Properties----->Master Server---->Properties---->Global Attributes........

watsons
Level 6

That should work for most policies, take a look at the bpbrm log to see if server does send the email or not. When a backup is done, this file /usr/openv/netbackup/bin/BACKUP_EXIT_NOTIFY  will be updated with the latest job, and its parameters will be passed to the email application for sending.

Ivy_Yang
Level 6

hi, watsons

thanks very much for you reply and it's very helpful.

and sorry for my late reply since there are some other pressing items....

I troubleshoot this issue as your suggestion.

1) I terminated the backup policy "awoltpsqlvs_sql_trans" and it indeed sent me alert.

[root@lxecnbumast bpbrm]# tail -f  /usr/openv/netbackup/logs/bpbrm/log.052112
21:55:08.517 [23693] <2> bpbrm main: INITIATING (VERBOSE = 0): version NetBackup 7.0 2010010419    

21:55:08.517 [23693] <2> logparams: -backup -S lxecnbumast.active.tan -c AWOLTPSQLVS -ct 13 -ru root -cl awoltpsqlvs_sql_trans -sched Diff_inc -bt 1337651708 -dt 26656 -st 1 -b AWOLTPSQLVS_1337651708 -mediasvr lxecnbumast.active.tan -jobid 33011 -jobgrpid 33011 -masterversion 700000 -maxfrag 20480 -reqid -1337152904 -mt 0 -to 0 -stunit lxecnbumast_aw_sql_trans_dd670_rdsu01 -rl 4 -rp 5356800 -p /ddusec01/rdsu01/aw/sql_trans -mst 1 -flags 0 -use_ofb -use_otm -nbu -jm -secure 1 -kl 28 -rg root -fso -connect_options 16974338
21:55:08.518 [23693] <2> db_freeEXDB_INFO: ?
21:55:08.553 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
21:55:08.553 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
21:55:08.755 [23693] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.42653 TO 10.73.70.81.13724
21:55:08.755 [23693] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.58137 TO 10.73.70.81.13724 fd = 5
21:55:08.787 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
21:55:08.987 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: 49357
21:55:09.071 [23693] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 4
21:55:09.071 [23693] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 5
21:55:09.074 [23693] <2> bpbrm main: send_3_0_client_params = 1
21:55:09.074 [23693] <2> bpbrm main: backup_cmd = /usr/openv/netbackup/bin/bpbkar bpbkar -r 5356800 -ru root -dt 26656 -to 0 -clnt AWOLTPSQLVS -class awoltpsqlvs_sql_trans -sched Diff_inc -st INCR -bpstart_to 300 -bpend_to 300 -read_to 300 -blks_per_buffer 512 -use_otm -fso -b AWOLTPSQLVS_1337651708 -kl 28 -ct 13
21:55:09.104 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
21:55:09.105 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
21:55:09.307 [23693] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.53124 TO 10.73.70.81.13724
21:55:09.307 [23693] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.41900 TO 10.73.70.81.13724 fd = 5
21:55:09.335 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
21:55:09.538 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: 49359
21:55:09.621 [23693] <2> bpcr_get_version_rqst: bpcd version: 07000000
21:55:09.623 [23693] <2> bpcr_get_charset_rqst: bpcd charset: 00000054
21:55:09.623 [23693] <2> ConnectionCache::connectAndCache: Acquiring new connection for host lxecnbumast.active.tan, query type 89
21:55:09.625 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
21:55:09.625 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpdbm
21:55:09.666 [23693] <2> logconnections: BPDBM CONNECT FROM 10.74.240.20.51798 TO 10.74.240.20.13724
21:55:09.669 [23693] <2> db_end: Need to collect reply
21:55:09.778 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
21:55:09.778 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
21:55:09.983 [23693] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.38308 TO 10.73.70.81.13724
21:55:09.983 [23693] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.47092 TO 10.73.70.81.13724 fd = 5
21:55:10.010 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
21:55:10.204 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: 49361
21:55:10.288 [23693] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 4
21:55:10.288 [23693] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 5
21:55:10.289 [23693] <2> bpcr_get_version_rqst: bpcd version: 07000000
21:55:10.290 [23693] <2> bpcr_get_platform_rqst: Server client platform length = 7
21:55:10.291 [23693] <2> bpcr_check_for_use_ofb_support: bpcd platform win_x64
21:55:10.291 [23693] <2> bpbrm main: received bpcd success message
21:55:14.188 [23693] <2> bpbrm check_for_terminate: process killed by signal 1
21:55:14.188 [23693] <2> bpbrm kill_child_process: start
21:55:14.188 [23693] <2> bpbrm kill_child_process: start
21:55:14.188 [23693] <2> bpbrm Exit: attempting to send mail to root on AWOLTPSQLVS
21:55:14.217 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
21:55:14.217 [23693] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
21:55:14.424 [23693] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.60124 TO 10.73.70.81.13724
21:55:14.424 [23693] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.60803 TO 10.73.70.81.13724 fd = 7
21:55:14.449 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
21:55:14.646 [23693] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: 49363
21:55:14.728 [23693] <2> bpbrm Exit: OUT_SOCK from bpcr = 4
21:55:14.728 [23693] <2> bpbrm Exit: IN_SOCK from bpcr = 7
21:55:14.729 [23693] <2> OpenMailPipe: /bin/mail -s "Backup on AWOLTPSQLVS - 150" "ProductionBackupSystemAlerts@activenetwork.com" >/dev/null 2>/dev/null 21:55:14.758 [23693] <2> bpcr_get_version_rqst: bpcd version: 07000000
21:55:14.758 [23693] <2> bpcr_get_version_rqst: bpcd version: 07000000
21:55:14.779 [23693] <2> bpcr_get_version_rqst: bpcd version: 07000000
21:55:14.800 [23693] <2> bpbrm Exit: client backup EXIT STATUS 150: termination requested by administrator
 

2) I terminated the  NDMP backup policy "exch_ash-fas01_snap_mb02_pubdb1_pri" and there was no alert.  The BACKUP_EXIT_CALLED was updated but didn't call the mail to send email

[root@lxecnbumast ~]# cat /usr/openv/netbackup/bin/BACKUP_EXIT_CALLED
Mon May 21 22:00:28 EDT 2012 -----------------------------
Mon May 21 22:00:28 EDT 2012        CLIENT:  bash-fas01
Mon May 21 22:00:28 EDT 2012        POLICY:  exch_ash-fas01_snap_mb02_pubdb1_pri
Mon May 21 22:00:28 EDT 2012      SCHEDULE:  Full
Mon May 21 22:00:28 EDT 2012 SCHEDULE TYPE:  FULL
Mon May 21 22:00:28 EDT 2012        STATUS:  150
Mon May 21 22:00:28 EDT 2012        STREAM:  0
Mon May 21 22:00:28 EDT 2012   DONE_TRYING:  1
Mon May 21 22:00:28 EDT 2012 -----------------------------


[root@lxecnbumast bpbrm]# tail -f  /usr/openv/netbackup/logs/bpbrm/log.052112
22:00:09.359 [24095] <2> bpbrm main: INITIATING (VERBOSE = 0): version NetBackup 7.0 2010010419   22:00:09.359 [24095] <2> logparams: -backup -S lxecnbumast.active.tan -c bash-fas01 -ct 19 -ru root -cl exch_ash-fas01_snap_mb02_pubdb1_pri -sched Full -bt 1337652008 -dt 0 -st 0 -b bash-fas01_1337652008 -mediasvr lxecnbumast.active.tan -jobid 33014 -jobgrpid 33014 -masterversion 700000 -maxfrag 20480 -reqid -1337152907 -mt 0 -to 0 -stunit lxecnbumast_exch_dd670_rdsu01 -rl 3 -rp 2678400 -p /ddusec01/rdsu01/exchange -mst 1 -flags 0 -use_ofb -use_otm -jm -secure 1 -kl 28 -rg root -fso -dmplevel 0 -connect_options 16974338
22:00:09.360 [24095] <2> verify_client: bpbrm.c.34211: db_getCLIENT failed for CLIENT: lxecnbumast.active.tan
22:00:09.360 [24095] <2> verify_client: bpbrm.c.34361: db_getCLIENT failed: 227 227 0x000000e3
22:00:09.363 [24095] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
22:00:09.363 [24095] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
22:00:09.404 [24095] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.58144 TO 10.74.240.20.13724
22:00:09.404 [24095] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.56470 TO 10.74.240.20.13724 fd = 5
22:00:09.405 [24095] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
22:00:09.445 [24095] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: /tmp/vnet-24098337652009445192000000000-5ALFzE
22:00:09.525 [24095] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 4
22:00:09.525 [24095] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 5
22:00:09.536 [24095] <2> Orb::init: initializing ORB EMMlib_Orb with: bpbrm -ORBSvcConfDirective "-ORBDottedDecimalAddresses 0" -ORBSvcConfDirective "static PBXIOP_Factory '-enable_keepalive'" -ORBSvcConfDirective "static EndpointSelectorFactory ''" -ORBSvcConfDirective "static Resource_Factory '-ORBProtocolFactory PBXIOP_Factory'" -ORBSvcConfDirective "static Resource_Factory '-ORBProtocolFactory IIOP_Factory'" -ORBSvcConfDirective "static PBXIOP_Evaluator_Factory '-orb EMMlib_Orb'" -ORBSvcConfDirective "static Resource_Factory '-ORBConnectionCacheMax 1024 '" -ORBSvcConf /dev/null -ORBSvcConfDirective "static Server_Strategy_Factory '-ORBMaxRecvGIOPPayloadSize 268435456'"(Orb.cpp:741)
22:00:09.542 [24095] <2> EndpointSelector::select_endpoint: performing call with the only endpt available!(Endpoint_Selector.cpp:437)
22:00:09.560 [24095] <2> bpbrm main: send_3_0_client_params = 1
22:00:09.561 [24095] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
22:00:09.561 [24095] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
22:00:09.602 [24095] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.53819 TO 10.74.240.20.13724
22:00:09.602 [24095] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.53667 TO 10.74.240.20.13724 fd = 8
22:00:09.603 [24095] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
22:00:09.644 [24095] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: /tmp/vnet-24101337652009644125000000000-21c2zT
22:00:09.726 [24095] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 7
22:00:09.726 [24095] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 8
22:00:09.726 [24095] <2> bpcr_get_version_rqst: bpcd version: 07000000
22:00:09.726 [24095] <2> bpcr_get_platform_rqst: Server client platform length = 14
22:00:09.726 [24095] <2> bpcr_check_for_use_ofb_support: bpcd platform linuxR_x86_2.6
22:00:09.726 [24095] <2> bpbrm main: received bpcd success message
22:00:09.859 [24095] <2> bpbrm main: ndmpagent_pid=24102
22:00:09.859 [24095] <2> bpbrm main: from client bash-fas01: read client start message
22:00:09.859 [24095] <2> bpbrm spawn_child: /usr/openv/netbackup/bin/bptm bptm -w -c bash-fas01 -dpath /ddusec01/rdsu01/exchange -stunit lxecnbumast_exch_dd670_rdsu01 -cl exch_ash-fas01_snap_mb02_pubdb1_pri -bt 1337652008 -b bash-fas01_1337652008 -st 0 -cj 1 -reqid -1337152907 -jm -brm -hostname bash-fas01 -ru root -rclnt bash-fas01 -rclnthostname bash-fas01 -rl 3 -rp 2678400 -sl Full -ct 19 -maxfrag 20480 -mediasvr lxecnbumast.active.tan -no_callback -connect_options 0x01010100 -jobid 33014 -jobgrpid 33014 -masterversion 700000 -bpbrm_shm_id 1817083906 -blks_per_buffer 512 -ndmpport 57012
22:00:09.860 [24095] <2> bpbrm write_continue_backup: wrote CONTINUE BACKUP on COMM_SOCK <7>
22:00:09.860 [24095] <2> write_file_names: buffering file name '/vol/wsmailmb02_pubdb1/.snapshot/exchsnap__wsmailmb02__recent' for output
22:00:09.860 [24095] <2> write_file_names: successfully wrote buffer to COMM_SOCK
22:00:09.860 [24095] <2> bpbrm main: wrote CONTINUE on COMM_SOCK
22:00:09.860 [24095] <2> bpbrm main: closing COMM_SOCK
22:00:09.860 [24095] <2> bpbrm main: from client bash-fas01: INF - CONTINUE BACKUP message received
22:00:14.212 [24095] <2> bpbrm mm_sig: received ready signal from media manager
22:00:14.314 [24095] <2> bpbrm check_for_terminate: process killed by signal 1
22:00:14.314 [24095] <2> signal_ndmpagent: sending signal=1 to ndmpagent on lxecnbumast.active.tan, client_pid=24102
22:00:14.314 [24095] <2> bpcr_send_signal: Ignoring connect_opts = 0x01030202
22:00:14.315 [24095] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2054: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
22:00:14.315 [24095] <2> vnet_vnetd_service_socket: ../../libvlibs/vnet_vnetd.c.2068: service: bpcd
22:00:14.356 [24095] <2> logconnections: BPCD CONNECT FROM 10.74.240.20.38004 TO 10.74.240.20.13724
22:00:14.356 [24095] <2> vnet_connect_to_vnetd_extra: ../../libvlibs/vnet_vnetd.c.188: msg: VNETD CONNECT FROM 10.74.240.20.36838 TO 10.74.240.20.13724 fd = 9
22:00:14.357 [24095] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.541: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
22:00:14.398 [24095] <2> vnet_vnetd_connect_forward_socket_begin: ../../libvlibs/vnet_vnetd.c.558: ipc_string: /tmp/vnet-24117337652014397897000000000-jns7PQ
22:00:14.478 [24095] <2> bpcr_send_signal: CLIENT_CMD_SOCK from bpcr = 7
22:00:14.478 [24095] <2> bpcr_send_signal: CLIENT_STAT_SOCK from bpcr = 9
22:00:14.616 [24095] <2> signal_ndmpagent: from client bash-fas01: INF - EXIT STATUS 150: termination requested by administrator
22:00:14.616 [24095] <2> bpbrm kill_child_process: start
22:00:14.616 [24095] <2> bpbrm wait_for_child: start
22:00:28.050 [24095] <2> bpbrm wait_for_child: child exit_status = 150 signal_status = 0
22:00:28.050 [24095] <2> bpbrm kill_child_process: start
22:00:28.050 [24095] <2> bpbrm Exit: client backup EXIT STATUS 150: termination requested by administrator

 

Ivy_Yang
Level 6

this is really a weird issue. indecision

 

watsons
Level 6

I forgot to ask you about your "Universal setting", is it set to "server sends mail" (correct setting)?

I may have to test on my server although I currently don't have a NDMP host to test with.. will let you know. 

Ivy_Yang
Level 6

I don't think it is related to "NDMP" since the the email notification doesn't work either for other non-NDMP backup policies of  this backup domain.  and Email notifications work well for the NDMP backup policies of other backup domain.

my  "Universal setting" is "client sends mail".

and I changed it to "server sends mail" since you mentioned this should be correct and bounced the NBU services also after the change.....
 

but it still doesn;t work crying

 

 

Mark_Solutions
Level 6
Partner Accredited Certified

can we see your backup_exit_notify contents - perhaps a filter has been set in it so that only those policies are selected for alerting

Ivy_Yang
Level 6

Hi, Mark

here is the script. I never edited it .

[root@lxecnbumast bin]# cat /usr/openv/netbackup/bin/backup_exit_notify
#! /bin/sh
# $Header: backup_exit_notify.sh,v 1.5 2009/08/10 20:44:49 $

#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2009 Symantec Corporation, All Rights Reserved $ *
#***************************************************************************
#ecpyrght

#
# backup_exit_notify.sh
#
# This script is called by the NetBackup scheduler, after an individual
# client backup has completed (including media closure and image db validation.
#
# NOTE:  this script will always be run in "background" mode, meaning that
#        the NetBackup scheduler will NOT wait for it's completion.
#
# This script:
#       receives 7 parameters:
#         CLIENT           - the client hostname
#         POLICY           - the policy label
#         SCHEDULE         - the schedule label
#         SCHEDULE_TYPE    - the type of schedule:  FULL INCR UBAK UARC
#         STATUS           - the backup status for this job
#         STREAM           - the backup stream number for this job
#         DONE_TRYING      - 0=will retry, 1=done, will not retry.
#       must be executable by the root user
#       should exit with 0 upon successful completion

OUTF=/usr/openv/netbackup/bin/BACKUP_EXIT_CALLED

# --------------------------------------------------------------------
# main script starts here
# --------------------------------------------------------------------

umask 022

dateStr=`date`
if [ "$#" -lt 7 ]
then
        echo ${dateStr} "backup_exit_notify expects at least 6 parameters: $*" >> $OUTF
        exit 1
fi

# You may want to delete the output file elsewhere in order to
# accumulate successful backup information.
# If so, comment out the following 4 lines.
if [ -s $OUTF ]
then
        /bin/rm -rf $OUTF
fi

if [ ! -f $OUTF ]
then
        touch $OUTF
fi

echo ${dateStr} "-----------------------------" >> $OUTF
echo ${dateStr} "       CLIENT:  $1" >> $OUTF
echo ${dateStr} "       POLICY:  $2" >> $OUTF
echo ${dateStr} "     SCHEDULE:  $3" >> $OUTF
echo ${dateStr} "SCHEDULE TYPE:  $4" >> $OUTF
echo ${dateStr} "       STATUS:  $5" >> $OUTF
echo ${dateStr} "       STREAM:  $6" >> $OUTF
echo ${dateStr} "  DONE_TRYING:  $7" >> $OUTF
echo ${dateStr} "-----------------------------" >> $OUTF

#
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares

exit 0

 

and here is the "BACKUP_EXIT_CALLED"  which produced if I terminated the job mannualy

[root@lxecnbumast ~]# cat /usr/openv/netbackup/bin/BACKUP_EXIT_CALLED
Mon May 21 22:00:28 EDT 2012 -----------------------------
Mon May 21 22:00:28 EDT 2012        CLIENT:  bash-fas01
Mon May 21 22:00:28 EDT 2012        POLICY:  exch_ash-fas01_snap_mb02_pubdb1_pri
Mon May 21 22:00:28 EDT 2012      SCHEDULE:  Full
Mon May 21 22:00:28 EDT 2012 SCHEDULE TYPE:  FULL
Mon May 21 22:00:28 EDT 2012        STATUS:  150
Mon May 21 22:00:28 EDT 2012        STREAM:  0
Mon May 21 22:00:28 EDT 2012   DONE_TRYING:  1
Mon May 21 22:00:28 EDT 2012 -----------------------------

Ivy_Yang
Level 6

I deleted all the policies alerts from OpsCenter and even delete this 7.0 NBU master and re-added it to OpsCenter..

but nothing works..........

this issue really makes me scratch my head................

Mark_Solutions
Level 6
Partner Accredited Certified

In the backup_exit_notify you need to add an extra line just before the exit 0 at the end - so that it looks like this:

# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares

cat $OUTF | mailx -s "Backup on $1 - $5" someone_who_cares

exit 0

Then replace someone_who_cares in that bottom line with the email address of who the mail should be sent to.

See if that works for you.

Ivy_Yang
Level 6

hi, Mark

seems doen;t work. I modified the script and bounced the NBU services...

[root@lxecnbumast bin]# cat /usr/openv/netbackup/bin/backup_exit_notify

.......................................................
# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares
cat $OUTF | mailx -s "Backup on $1 - $5" someone_who_cares

exit 0

 

but after I terminated exch_ash-fas01_snap_mb02_db5_pri manually, I still didn't receive the alert.

and the bpbrm log also showed that it didn't call the mails daemon..................... 

[root@lxecnbumast bin]# cat BACKUP_EXIT_CALLED
Thu May 24 22:16:50 EDT 2012 -----------------------------
Thu May 24 22:16:50 EDT 2012        CLIENT:  bash-fas01
Thu May 24 22:16:50 EDT 2012        POLICY:  exch_ash-fas01_snap_mb02_db5_pri
Thu May 24 22:16:50 EDT 2012      SCHEDULE:  Full
Thu May 24 22:16:50 EDT 2012 SCHEDULE TYPE:  FULL
Thu May 24 22:16:50 EDT 2012        STATUS:  150
Thu May 24 22:16:50 EDT 2012        STREAM:  0
Thu May 24 22:16:50 EDT 2012   DONE_TRYING:  1
Thu May 24 22:16:50 EDT 2012 --------------------------

watsons
Level 6

Ivy,

I just managed to get my test ndmp policy up today (using Netapp simulator), and using your exact test scenario, I am afraid I have the same problem. The email notification only works for non-ndmp policy.

However, Mark's solution works for me. I got the email, which is expected because every job is going to call backup_exit_notify (and write to the BACKUP_EXIT_CALLED), and if that line is uncommented, it shall send email - well, unless your mail server is not working.

Having said that, what I don't like about using backup_exit_notify to send out email is:

- Different format
- If you turn on normal notification, you will get duplicate emails about the same failed job.

As for the ndmp policy, from what I noticed from bpbrm log, it seems the calling functions are a bit different.. in ndmp policy, bpbrm would call ndmpagent to manage the backup (via filer dump, which makes sense). But when a status is returned, bptm does not capture that and call the OpenMailPipe function.

Not sure if this is bug or simply ndmp can't use the typical email notification. Probably log a call to Support?

watsons
Level 6

I used to have ndmp policies in my previous work environment, and had no problem receiving email notification. That time was using Netbackup 5.x , but I can't remember whether we are using the typical setup or if I modify backup_exit_notify to get it working...

Mark_Solutions
Level 6
Partner Accredited Certified

Ivy_Yang ...someone_who_cares should read you@yourdomain.com (i.e. your email address) did you change that?

watsons .... ndmp use their own set of scripts - you can add an ndmp_end_notify(.bat) to the netbackup bin directory to send out your mail - see the NDMP admin Guide "Using Scripts" section.

Hope this helps

watsons
Level 6

Thanks for the great tips, Mark!

Ivy_Yang
Level 6

the email notification works for  ndmp policies in our other backup domains(6.5.4, 7.1). and I didn;t change any script.

 

I am not sure whether it's a bug for 7.0...I've already opened a Symantec case and the engineer made some tests but still not fixed yet.

 

anyway if I find the root cause I will update with you

Ivy_Yang
Level 6

Hi Mark

sorry but I tested again replcing "someone_who_cares" with my own email address...

bouced the NBU services ...

yes it indeed sent email to me but seems different with the previous notification.

it looks as below only mail me "/usr/openv/netbackup/bin/BACKUP_EXIT_CALLED"

anyway I received the email..........

 

and I got the same when I modified  /usr/openv/netbackup/bin/ndmp_end_notify as per the Symantec engneer's suggestion

 

Mon May 28 23:26:02 EDT 2012 -----------------------------

Mon May 28 23:26:02 EDT 2012        CLIENT:  bash-fas01

Mon May 28 23:26:02 EDT 2012        POLICY:  exch_ash-fas01_snap_mb02_db8_pri

Mon May 28 23:26:02 EDT 2012      SCHEDULE:  Full

Mon May 28 23:26:02 EDT 2012 SCHEDULE TYPE:  FULL

Mon May 28 23:26:02 EDT 2012        STATUS:  150

Mon May 28 23:26:02 EDT 2012        STREAM:  0

Mon May 28 23:26:02 EDT 2012   DONE_TRYING:  1

Mon May 28 23:26:02 EDT 2012 -----------------------------