Email alerting

totalstu

ADSM.ORG Member
Joined
May 7, 2009
Messages
111
Reaction score
0
Points
0
Location
Toronto, Canada
Hi,

New to fastback, though have experience in TSM 5.5 and 6.1. I've got fastback working properly but trying to stop some alerts from being emailed. So far I have INFO and WARNING emails be sent. No errors yet so not getting ERROR emails. How can I stop the INFO emails from being sent? I don't really need to know the successful stuff, just when there are issues. I've opened externalnotification.bat and see this:
:SEND_MAIL_LABEL
REM Send alert if category is either WARNING or ERROR
contain.exe "%XR_EVENT_LEVEL%" "WARNING" "ERROR"

I would think this means it will only send Warning and Errors emails and not INFO emails but that is not the case. Any suggestions?

Thanks
 
Still hoping for some assistance. FB runs every 6 hours, sending 20 emails per run. 17 of those are INFO, which is basically "successful". Below is the complete contents of externalnotification.bat

Echo on

REM This path should be modified if Fastback is not installed in default location
cd /d "%ProgramFiles%\Tivoli\TSM\FastBack\utilities"

:EMAIL_LABEL
REM SMTP_SERVER - The SMTP server address (this field must be configured).
SET SMTP_SERVER=10.0.0.13
REM SMTP_PORT - The SMTP server port. The default is 25 (this field must be configured).
SET SMTP_PORT=25
REM SMTP_TO_ADDRESS - The receiver address (this field must be configured).
SET [email protected]
REM SMTP_FROM_ADDRESS - The sender address. (This field can be changed).
SET [email protected]

REM * An IF command that checks if the current notification is Event log. If yes,
REM * it goes to the label EVENT_LOG_LABEL
IF /I %XR_TYPE% == EVENT_LOG goto EVENT_LOG_LABEL
SET SMTP_SUBJECT="FastBack %XR_EVENT_LEVEL% From %XR_MODULE% on %COMPUTER_NAME%."

echo FastBack Server Machine name - %COMPUTER_NAME% > %XR_BODY_FILE_NAME%
echo FastBack Client Machine name - %XS_JOB_SERVER_NAME% >> %XR_BODY_FILE_NAME%
echo Volume - %XS_JOB_VOLUME_NAME% >> %XR_BODY_FILE_NAME%
echo Policy %XS_JOB_ACTION_NAME% >> %XR_BODY_FILE_NAME%
echo %XS_JOB_START_TIME% >> %XR_BODY_FILE_NAME%
echo ----------------------------------------------------- >> %XR_BODY_FILE_NAME%
echo %XR_EVENT_LEVEL%: %XR_MSGID% %XR_MSG% >>%XR_BODY_FILE_NAME%

goto SEND_MAIL_LABEL

:EVENT_LOG_LABEL
SET SMTP_SUBJECT="FastBack %XR_EVENT_LEVEL% From %XR_MODULE% on %COMPUTER_NAME%"
echo %XR_EVENT_LEVEL%: %XR_MSGID% %XR_MSG% > %XR_BODY_FILE_NAME%
goto SEND

:SEND_MAIL_LABEL

REM Send alert if category is either WARNING or ERROR
contain.exe "%XR_EVENT_LEVEL%" "WARNING" "ERROR"
If %ERRORLEVEL% EQU 0 goto SEND
contain.exe "%XR_MSG%" "aborted" "The limit for repository" "Unable to initiate snapshot" "Failed to initiate cleanup on volume" "will not perform any snapshots"
If %ERRORLEVEL% EQU 0 goto SEND
contain.exe "%XR_MSG%" "The Exchange service failed to start" "The Exchange service failed to terminate" "The FastBackServer Failed to access Repository in path"
If %ERRORLEVEL% EQU 0 goto SEND
contain.exe "%XR_MSG%" "The Repository has Sanity Problem" "Repository Not found on initial" "The Repository in path" "The cleanup of snapshot" "Verification of job"
If %ERRORLEVEL% EQU 0 goto SEND
contain.exe "%XR_MSG%" "The repository is cleared"
If %ERRORLEVEL% GTR 0 goto END

:SEND
FastBackSendMail.exe -s %SMTP_SERVER% -p %SMTP_PORT% -t %SMTP_TO_ADDRESS% -f %SMTP_FROM_ADDRESS% -a %SMTP_SUBJECT% -m %XR_BODY_FILE_NAME%


:end

Thanks
 
Looking in the GUI under General Configuration i see the event log level set to "All Information". Would changing it to be "Warning & Errors" accomplish what I'm trying to do?

Thanks
 
Hi Totalstu,

I was wondering if you were ever able to get anywhere with this issue? In my case I need all the info or at least the successful stuff but all I get is errors. The documentation on this is very poor.

Thanks in advcance
 
Hi Ober,

I haven't gotten anywhere with the this issue. Interesting that you have only the successfulls and i have only the errors and warning. I agree documentation is poor.

I am going to reboot tonight and hoping maybe that will help but i doubt it.
 
Hi Totalstu,

Ok I have figured it out. There is no need to reboot as the bat file is read each time an event takes place so if you change the bat then the next time it gets used it will be used with the new parameters. To test try putting REM in front of the Fastbacksendmail line. You should not see any notifications after that.

To configure this I basically copied one of the contain.exe lines and then in parenthesis tried different words like "DR",, that would then send me two e-mails, when the DR started and completed on each policy.. oh and a final one when the entire DR process finished. Then I added things lke "Snapshot completed successfully" and removed all the other ones. That would send me an e-mail when snapshots completed with some details (unfortunately have not figured out a way to get the size of each snapshot in this e-mail, although the DR one gives size. Anyways this might not be the exact right way to do this but it worked for me.

Tell me how you get along.

cheers

Geoff
 
Hi Ober/Geoff,

Can i bother you to show me the contents of your ExternalNotification.bat file? I'm not sure exactly what you did.

Thanks

BTW, you are correct in that rebooting didn't help. It did cause an error and now I have to apply firmware updates to the computer before IBM will come and replace a potential faulty RAM DIMM. IBM is saying the error message may be due to not having the correct firmware installed.
 
Hi Totalstu

It is basically the default one with the parameters filled in and a few things that I added:


@Echo OFF

REM This path should be modified if Fastback is not installed in default location
cd /d "%ProgramFiles%\Tivoli\TSM\FastBack\utilities"

:EMAIL_LABEL
REM SMTP_SERVER - The SMTP server address (this field must be configured).
SET SMTP_SERVER=127.0.0.1
REM SMTP_PORT - The SMTP server port. The default is 25 (this field must be configured).
SET SMTP_PORT=25
REM SMTP_TO_ADDRESS - The receiver address (this field must be configured).
SET SMTP_TO_ADDRESS=
REM SMTP_FROM_ADDRESS - The sender address. (This field can be changed).
SET SMTP_FROM_ADDRESS=
REM * An IF command that checks if the current notification is Event log. If yes,
REM * it goes to the label EVENT_LOG_LABEL
IF /I %XR_TYPE% == EVENT_LOG goto EVENT_LOG_LABEL
SET SMTP_SUBJECT="FastBack %XR_EVENT_LEVEL% From %XR_MODULE% on %COMPUTER_NAME%."

echo FastBack Server Machine name - %COMPUTER_NAME% > %XR_BODY_FILE_NAME%
echo FastBack Client Machine name - %XS_JOB_SERVER_NAME% >> %XR_BODY_FILE_NAME%
echo Volume - %XS_JOB_VOLUME_NAME% >> %XR_BODY_FILE_NAME%
echo Policy %XS_JOB_ACTION_NAME% >> %XR_BODY_FILE_NAME%
echo %XS_JOB_START_TIME% >> %XR_BODY_FILE_NAME%
echo ----------------------------------------------------- >> %XR_BODY_FILE_NAME%
echo %XR_EVENT_LEVEL%: %XR_MSGID% %XR_MSG% >>%XR_BODY_FILE_NAME%

goto SEND_MAIL_LABEL

:EVENT_LOG_LABEL
SET SMTP_SUBJECT="FastBack %XR_EVENT_LEVEL% From %XR_MODULE% on %COMPUTER_NAME%"
echo %XR_EVENT_LEVEL%: %XR_MSGID% %XR_MSG% > %XR_BODY_FILE_NAME%
goto SEND_MAIL_LABEL

:SEND_MAIL_LABEL

..\common\contain.exe "%XR_MSG%" "aborted" "The limit for repository" "Unable to initiate snapshot" "Failed to initiate cleanup on volume" "will not perform any snapshots" "DR" "snapshot completed successfully"
If %ERRORLEVEL% EQU 0 goto SEND
..\common\contain.exe "%XR_MSG%" "The Exchange service failed to start" "The Exchange service failed to terminate" "The FastBackServer Failed to access Repository in path"
If %ERRORLEVEL% EQU 0 goto SEND
..\common\contain.exe "%XR_MSG%" "The Repository has Sanity Problem" "Repository Not found on initial" "The Repository in path" "The cleanup of snapshot" "Verification of job"
If %ERRORLEVEL% EQU 0 goto SEND
..\common\contain.exe "%XR_MSG%" "The repository is cleared"
If %ERRORLEVEL% GTR 0 goto END

:SEND
FastBackSendMail.exe -s %SMTP_SERVER% -p %SMTP_PORT% -t %SMTP_TO_ADDRESS% -f %SMTP_FROM_ADDRESS% -a %SMTP_SUBJECT% -m %XR_BODY_FILE_NAME%


:end
del %XR_BODY_FILE_NAME%
 
Hi Ober67,

Thanks for posting that. I wonder what that file looked like before you made the changes.

In my case we were getting all the alerts. The way it's set up is to backup every 6 hours. DR nightly at 10PM. Every 6 hours we'd get 30 or so emails with the vast majority being the completed successfully kind. So 120 or so emails per day and then more emails when DR kicks in. Our phones would beep constantly as the emails arrived. They wanted a way to only get the error and warning emails as those are the ones to be concerned about. I have found a way to do this via our spam filter and filtering via words in the subject. I then had a discussion with the higher ups and convinced them this was not the way to go. I suggested creating a mailbox where all these emails could go and then setting up a rule to forward only the warning and error emails to support. We'll then set up anothe rule or whatever to delete the emails after a certain time period so the mailbox doesn't grow to large.

Thanks again,

Stuart
 
I just added the "DR" and the "snapshot completed successfully" as I figured that the contain.exe just goes through the logs and finds the string then pushes out the e-mail. Funny because in the bat that you posted I don't see anything that should make it behave the way it does for you. My change has also resulted in too many e-mails and I would like to try and find a way of having this stupid thing send one final e-mail with a summary of the local backups and then on with a summary of the DR's.

Also the SMTP examples in the same utilities folder I don't quite get, i.e. how does one enable them. I am thinking about going back to IBM on this and asking for what I want but I don't know whether they will take this as a PMR or not. The documentation concerning the alerts is not great to say the least. Perhaps this is quite simple but I am just too dumb to figure it out.

cheers
 
I'd like to see detailed reporting like I used to see in TSM 5.5 though I don't know if that possible in FB. At another job, we had TSM 5.5 and created a new TSM 6.2 server and reporting in v6 was terrible. With a little help here at ADSM.org I was able to get 5.5 reporting to work on v6. This FB 6.1.3 server doesn't have common reporting installed or anything. I'm not sure it will give me what I want even if I installed all the reporting. More research needed.

As for those samples, I never really looked at them. Having just checked one it looks like similiar content to the externalnotification.bat file. Maybe you just add some of the content to the bat file. You are correct in that documentation is lacking. If you find out anything please post.

Thanks

Stuart
 
Back
Top