Data Backup and Recovery

Snap Creator 4.3.0 - Using "Event Settings" only for "Failure Trap Message"

MatthiasSander
6,107 Views

Hello,

 

we want to use the SC Event Settings for sending Failure Trap Messages only.

 

Information from the administration guide:

SENDTRAP:
Interfaces with your monitoring software or email, enabling you to pass the alerts that are generated from Snap Creator into your own monitoring infrastructure. The %MSG variable is the message sent from Snap Creator.
--> My unterstanding: This channel is the only one who sends the FAILURE_MSG (%MSG), but also the SUCCESS_MSG(%SUCCESS_MSG).

FAILURE_MSG:
Logs the failure message that is defined in case of a Snap Creator failure. This failure message can also be sent to SENDTRAP if SENDTRAP is defined.
--> My unterstanding: The FAILURE_MSG can only by send by SENDTRAP. For example: /usr/bin/mailx -s %MSG matthias@xxxxxx.de </dev/null

SUCCESS_TRAP:
Interfaces with your monitoring software or email, enabling you to pass the success message generated from Snap Creator into your own monitoring infrastructure. The %SUCCESS_MSG variable is the success message for Snap Creator.
--> My unterstanding: This channel can only snet the SUCCESS_MSG(%SUCCESS_MSG).

SUCCESS_MSG:
After a successful Snap Creator backup, this setting logs the message that is defined. The message is also sent to SUCCESS_TRAP, if SUCCESS_TRAP is defined, or to SENDTRAP, if SENDTRAP is defined.

--> My unterstanding: When no SUCCES_TRAP is defined, the SUCCESS_MSG will be sent by SENDTRAP.

 

Why are there 2 options to send the email?

One channel only for the success messages and one for both (if no SUCCES_TRAP is defined) or only for error messages.

 

We have many SC schedules for SnapMirror tasks, because we also want controll those tasks togheter with the SnapVault schedules together in the SC.

And it is not very handy when you get an success message every 15 minutes or so.

 

Is it possible to configure the event settings only for error messages?

 

My workaround #1 - Creating an own "null" output

Create empty file /opt/NetApp/scSuccessTrap/null
chmod 700 null


SUCCESS_TRAP=/opt/NetApp/scSuccessTrap/null

 

The SC executes the empty bash script null.The output will be sent into the nirvana.

SC log: Sending Trap message to external system /opt/NetApp/scSuccessTrap/null.

 

My workaround #2 - Redirecting the output to file instead of sending an email

Creating file /opt/NetApp/scSuccessTrap/redirect
chmod 700 null

 

File content:

#/bin/bash
timestamp=$(date +%Y%m%d_%H%M%S)
date=$(date +%Y%m%d)
echo $timestamp $1 >> /opt/NetApp/scSuccessTrap/"$date"_successtrap_redirect

 

SUCCESS_TRAP=/opt/NetApp/scSuccessTrap/redirect %SUCCESS_MSG

 

The SC executes the bash script redirect. The redirect generates a new file everyday with output from SC.

SC log: Sending Trap message to external system /opt/NetApp/scSuccessTrap/redirect "INFO: NetApp Snap Creator Framework finished successfully '(Action: backup) (Config: xxxxxx)'"

 

Output file example:

20170107_004519 INFO: NetApp Snap Creator Framework finished successfully '(Action: backup) (Config: xxxxxx)'
20170107_004519 INFO: NetApp Snap Creator Framework finished successfully '(Action: backup) (Config: xxxxxx)'

 

 

 

Regards,

Matthias

2 REPLIES 2

SrinathATT
4,745 Views

Any syntax tht you can provide for alerting where Snapcreator server is installed on windows 2012 server.

 

Regards,

Srinath

MatthiasSander
3,724 Views

Hello Srinath,

 

the last time I needed to realise a windows mailing client was a few years ago. I used the program blat to send emails via smtp under windows.

 

Best regards,

Matthias

Public