Data Backup and Recovery
Data Backup and Recovery
I'm running Snap Creator 4 on AIX 6.1 and trying to use the Event Notifications feature to send fail/success messages from Snap Creator. I noticed that the Snap Creator job hangs if I include the SENDTRAP settings. Here is the section of the config with the event notifications settings:
########################################################################################################################
# Event Options #
########################################################################################################################
NTAP_ASUP_ERROR_ENABLE=N
SUCCESS_MSG=INFO: Snap Creator Framework finished successfully (Action: %ACTION)
SENDTRAP=/usr/bin/mailx -s %MSG my@emailaddress < /dev/null
SUCCESS_TRAP=/usr/bin/mailx -s %MSG my@emailaddress < /dev/null
Note: I've replaced my actual email address with my@emailaddress.
If I copy and paste the command into the command line it successfully sends the mail.
Please try to include double quotes like below and try again.
SENDTRAP=/usr/bin/mailx -s " %MSG " my@emailaddress < /dev/null
SUCCESS_TRAP=/usr/bin/mailx -s " %MSG " my@emailaddress < /dev/null
Hi Siva,
I tried adding the double quotes but it still didn't work. Any other ideas?
Thanks,
Leighton
This is how I was able to receive emails on AIX.
SENDTRAP=echo "something" | /usr/bin/mailx -s TYPEYOURSUBJECT my@emailaddress
None of the %MSG stuff got expanded, and there is a defect request already about this.
Could you please try above syntax and let me know if it works?
Hi Siva,
I used the syntax you provided and Snap Creator said it completed successfully but I'm still not getting the mail.
[2013-10-23 12:21:00,246] INFO: Sending Trap message to external system echo "Snap Creator Job Succeeded" | /usr/bin/mailx -s Test my@emailaddress
1502 [2013-10-23 12:21:00,363] INFO: stdout:"Snap Creator Job Succeeded" | /usr/bin/mailx -s Test my@emailaddress
If I use the same syntax on the command line I get the mail. I've asked my sysadmin to check if the mail queue has any held messages so I'll wait to see if that's where it's failing.
Leighton
Leighton,
Please let me know if this is resolved.
I am available this week to look at this further.
Thanks,
Siva Ramanathan
Hi Siva,
Sorry for the late response. I still haven't gotten this to work. No email from SC but works from OS command-line.
Thanks.
I ran into this at another customer site.
4.1.2 SCF server on AIX
The issue was narrowed down to "(" used in the SUCCESS_MSG.
ksh does not seem to like.
The below settings worked fine for me.
SUCCESS_MSG=INFO: Snap Creator Framework finished successfully Action: %ACTION Config: %CONFIG_TYPE
SENDTRAP=/bin/ksh -c '/usr/bin/mailx -s %MSG my@emailaddress </dev/null'
SUCCESS_TRAP=/bin/ksh -c '/usr/bin/mailx -s %MSG my@emailaddress </dev/null'
The /dev/null settings can be substituted with the absolute path name of the debug or out log file name.
(You can use %SNAP_TIME for the timestamp portion of the log)