Subscribe

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

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