Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

Alert e-mail modification

 

Information

 

Summary:

Possibilities of modifying e-mails sent by Alerts in the Monitoring Center.

Environment:

Product: Flowmon Collector

Version: Any

Platform: Any

Question/Problem Description:

Is it possible to modify e-mail content sent by Alert?

Steps to Reproduce:  
Error Message:  
Defect Number:  
Enhancement Number:  
Cause:  
Resolution: It is not possible to modify e-mail content for Alerts.
Workaround:

It is possible to create a custom script that sends custom e-mails.

Script example:

#!/bin/bash

# start of mandatory part of source code
. /usr/local/bin/fmc_alert_functions
if [ -L $0 ] ; then
DIR=$(dirname $(readlink -f $0)) ;
else
DIR=$(dirname $0) ;
fi ;
input_json=$(cat "$DIR/pluginscript_input")
parse_alert_data "$input_json"
# end of mandatory part of source code

# Get script parameters
while getopts "m:" opt; do
case "${opt}" in
m)
MAIL=${OPTARG}
;;
\? ) echo "Usage: cmd -m <mail address>"
;;
esac
done

# Create a body for the email
printf "Hello, \n Alert $ALERT_NAME was triggered at $ALERT_TIMESLOT. \n\n" > /tmp/body.txt

# Send an email to specified address
/usr/bin/php /var/www/shtml/index.php Cli:SendEmail -file="/tmp/body.txt" -to="$MAIL" -subject="$ALERT_NAME"

# Clean the tmp dir
rm /tmp/body.txt

It is necessary to add the parameter "-m <mail address>" in the Alert configuration.

Notes:  

Was this article helpful?
0 out of 0 found this helpful

Comments