Sunday 29 May 2016

blogger

[WLS 12.2.1.0.0]Script to get the email notification in case current or pending messages on distributed queues are greater than zero on any of the JMS server.

Hello Viewer,

I wanted to get the notification in case current or pending messages on distributed queues are greater than zero on any of the JMS server.
One easy way for this is to create watches and Notification under WLDF. But since i am using weblogic version 12.2.1.0.0, it is not easy to create policy for this task as rule expression tab is not present in 12.2.1.0.0 when policy type is "collected metric".

So i thought of creating the script which can constantly monitor the set of queues and will send an email notification having html content with proper cosmetics :)
Below are the steps to be followed:

1) Create a file QueueReport.sh with below content:

----------------------------------------------------------------------------------------------------------
#!/bin/sh
# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="wl_home"
cd /MyLocation/QueueReport
rm QueueReport.txt
umask 027
   echo "CHECKING QUEUE STATUS " > finalStatus3.out
    while read LINE; do
      date >> QueueReport.txt
      queue=$(echo "$LINE" | awk -F, '{ print $1 }');

    sh ${WL_HOME}/common/bin/wlst.sh /MyLocation/QueueReport/QueueReport.py $queue >> QueueReport.txt
    done < QueueList.txt
cat QueueReport.txt | grep "queue/topic" >> finalStatus3.out
grep -v "is 0 and 0" finalStatus3.out > temp.txt
mv temp.txt finalStatus3.out
echo "CHECKED QUEUE STATUS " >> finalStatus3.out
----------------------------------------------------------------------------------------------------------

2) Create a file QueueReport.py with below content:


Note: I am assuming there are two Managed server and two JMS server targeted to each managed server respectively.
 Change the below values according to your ennvironment.

jms_module name: JMS_TST_MODULE
jms server name :  JMS_TST_SERVER1,  JMS_TST_SERVER2
managed server name:  SOA_MS1,  SOA_MS2

-----------------------------------------------------------------------------------------------------------
import ConfigParser

def connectToServer():
        USERNAME = 'username'
        PASSWORD = 'password'
        URL='t3://Adminhost:Adminport'
        #Connect to the Administration Server
        print 'starting the script ....'
        connect(USERNAME,PASSWORD,URL)

def disconnectFromServer():
    print "Disconnecting from the Admin Server"
    disconnect()
    print "Exiting from the Admin Server"
    exit()
    print "Mission Accomplished"

def readConfigurationFile(myDestinationName):
    try:
          cd('ServerRuntimes/SOA_MS1/JMSRuntime/SOA_MS1.jms/JMSServers/JMS_TST_SERVER1/Destinations/JMS_TST_MODULE!JMS_TST_SERVER1@'+myDestinationName)
        current1=str(cmo.getMessagesCurrentCount());
        pending1=str(cmo.getMessagesPendingCount());
      cd('ServerRuntimes/SOA_MS2/JMSRuntime/SOA_MS2.jms/JMSServers/JMS_TST_SERVER2/Destinations/JMS_TST_MODULE!JMS_TST_SERVER2@'+myDestinationName)
        current2=str(cmo.getMessagesCurrentCount());
        pending2=str(cmo.getMessagesPendingCount());
        totalcurrent = int(current1) + int(current2)
        totalpending = int(pending1) + int(pending2)

        print 'The number of current/pending  messages on JMSServer in the queue/topic '+myDestinationName+' is '+str(totalcurrent)+' and '+str(totalpending)
    except :
        print 'Unable to find admin server...'
        exit()

    print 'Command executed successfully'

###############     Main Script   #####################################
#Conditionally import wlstModule only when script is executed with jython
if __name__ == '__main__':
    from wlstModule import *#@UnusedWildImport
print('This will enable you to give report for JMS Queues')
connectToServer()
readConfigurationFile(sys.argv[1])
####################################
----------------------------------------------------------------------------------------------------------------

3) Create a file QueueList.txt having the name of the queues that needs to be monitored.

----------------------------------------------------------------------------------------------------------------
queuename1
queuename2
queuename3
----------------------------------------------------------------------------------------------------------------

4) Create a file QueueMessageReport.sh with below content:

-----------------------------------------------------------------------------------------------------------------
#!/bin/bash
MAILTO=abc@gmail.com
MAILCC=abc@gmail.com
MAILFROM=abc@gmail.com
OUTPUT=/MyLocation/QueueReport/finalStatus.html

# Start the processes in parallel...
cd /MyLocation/QueueReport
sh QueueReport.sh

echo '<html>' > $OUTPUT
echo "<br /><b style='color:#ff0000'>Queue Status for SOA TESTR2</b> <br /><br />" >> $OUTPUT
COUNT=0
while read LINE ; do
    if [ "${LINE}" = "CHECKING QUEUE STATUS" ]; then
        echo "<table border=2 cellpadding=10 cellspacing=0>" >> $OUTPUT
        echo "<tr style='background-color:#787878;color:white;font-weight:bold'><td>Queue Name</td><td>JMS Server</td><td>Pending Message</td><td>Current Message</td></tr>" >> $OUTPUT
    elif [ "${LINE}" = "CHECKED QUEUE STATUS" ]; then
        echo "</table><br/><br/>" >> $OUTPUT
    else
       echo "<tr style='background-color:white;font-weight:bold'>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $11}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $7}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $15}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "<td>" >> $OUTPUT
       echo "$LINE" | awk -F " " '{print $13}' >> $OUTPUT
       echo "</td>" >> $OUTPUT
       echo "</tr>" >> $OUTPUT
    fi
done < finalStatus3.out
grep -v "CHECKING QUEUE STATUS" finalStatus3.out > tempfile.txt
mv tempfile.txt finalStatus3.out
grep -v "CHECKED QUEUE STATUS" finalStatus3.out > tempfile1.txt
mv tempfile1.txt finalStatus3.out
if [[ -s finalStatus3.out ]] ; then
(
 #                       echo "From: $MAILFROM"; \
                        echo "To: abc@gmail.com"; \
                     #   echo "Cc: $MAILCC"; \
                        echo "Content-Type: text/html";\
                        echo "Subject: QueueReport"; \
                        echo ""; \
                       cat $OUTPUT; \
                ) | /usr/lib/sendmail -t
else
echo "FILE is empty."
fi ;
-----------------------------------------------------------------------------------------------------------------

How to Run:

Execute the below command:
sh QueueMessageReport.sh

Thanks a lot for your patience!!!

Regards
-Ashish

Saturday 28 May 2016

blogger

Password less authentication for SFTP/SSH between two host

Hello Viewer,

Below are the steps to establish password less authentication between two host.

Example :
you are on "machine1.info.company1.com" and you want password less authentication on "machine2.info1.company2.com" for user "shyam"

Follow the below steps:

1) Log in to "machine1.info.company1.com" with user "user1".

2)  Go to below directory:
     cd /home/user1/.ssh/

3) Generate public-private key pair using below command.
     ssh-keygen -t rsa

     Enter file in which to save the key (/home/web/.ssh/id_rsa):Press Enter
     Enter passphrase (empty for no passphrase): Press Enter
     Enter same passphrase again: Press Enter

     Your identification has been saved in /home/web/.ssh/id_rsa.
     Your public key has been saved in /home/web/.ssh/id_rsa.pub.

     Verify the date of the above files.

4) SSH to other machine and perform below steps.
    ssh shyam@machine2.info1.company2.com , enter the password
    cd /home/shyam
    Change .ssh directory to 700 permission
    cd .ssh
    Take the backup of authorized key folder
    Change authorized_keys to 600 permissions
    ctrl+C

5) Execute the below command:
    cat /home/user1/.ssh/id_rsa.pub | ssh shyam@machine2.info1.company2.com 'cat >> .ssh/authorized_keys'

6) Close the current session and again log in to "machine1.info.company1.com" with user "user1"

7) Try  ssh shyam@machine2.info1.company2.com
   
This time it should not ask for the password.

Thanks a lot for your patience!!!

Regards
-Ashish

Thursday 26 May 2016

blogger

[OSB 12c] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean

Hello viewer,

I was trying to create the scripts for performing different operation on OSB like deployment , enabling/disabling of proxy, list out the deployed OSB service etc..
Although i have already created these scripts for 11g version of OSB but the jars which i used in shell script are not working in 12c.

In 12c below jar are not available: [snippet from .sh file]
--------------------------------------------------------------------------------------------------------
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/sb-kernel-api.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/modules/com.bea.common.configfwk_1.2.1.0.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/alsb.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/sb-kernel-impl.jar
---------------------------------------------------------------------------------------------------------
when i tried to run the same script in 12c it was giving the error:

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionManagementMBean


 Solution:

write below command in your shell script(.sh file)

a) MW_HOME="middleware home where osb is installed"
    export MW_HOME

b). $MW_HOME/osb/tools/configjar/setenv.sh

DON'T miss the dot(.) in above command

c) ${MW_HOME}/osb/tools/configjar/wlst.sh  ${DIR_EXECUTION}/proxytask.py

use wlst.sh from this location   ${MW_HOME}/osb/tools/configjar



Thanks a lot for your patience!!!

Regards
-Ashish

Monday 23 May 2016

blogger

Script to enable and disable the proxy service in OSB

Hello Viewer,

Below is the script for enabling and disabling the proxy in OSB which may be required during any end system downtime or for just bouncing the proxy due to some issue like not picking up the messages from queue or any other one.

Note: This is for version prior to 12c.


Steps to be followed:


1) create a file ProxyOperation.py with below content:


------------------------------------------------------------------------------------------------------------------
import wlstModule
import sys
import os
import socket
from com.bea.wli.sb.management.configuration import SessionManagementMBean
from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
from com.bea.wli.config import Ref
from java.lang import String
from com.bea.wli.monitoring import StatisticType
from com.bea.wli.config import Ref
from com.bea.wli.sb.util import Refs
from com.bea.wli.sb.management.configuration import CommonServiceConfigurationMBean
from java.lang import String
from com.bea.wli.monitoring import StatisticType
from com.bea.wli.config import Ref
from com.bea.wli.sb.util import Refs
from com.bea.wli.sb.management.configuration import CommonServiceConfigurationMBean
project = sys.argv[1]
print('project name  is: ', project)
service = sys.argv[2]
print('service name  is: ', service)
action = sys.argv[3]
print('operation name  is: ', action)
connect('user','password','t3://AdminHost:Adminport')
domainRuntime()
print('WLST Connected')
sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
print('... after session. Session is: ', sessionName)
sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
print('SessionMBean is: ', sessionMBean)
sessionMBean.createSession(sessionName)
print(String('Session was created ... ').concat(sessionName))
mbean = findService(String('ProxyServiceConfiguration.').concat(sessionName),'com.bea.wli.sb.management.configuration.ProxyServiceConfigurationMBean')
projectName = Refs.makeParentRef(project + '/')
proxyRef = Refs.makeProxyRef(projectName, service)
if action == 'disable' :
  print "Disabling " + service +" has been completed"
  mbean.disableService(proxyRef)
else :
  print "Enabling " + service +" has been completed"
  mbean.enableService(proxyRef)
if action == 'disable' :
  service1 = service+" disabled"
  print service1
  sessionMBean.activateSession(sessionName, service1)
else :
  service1 = service+" enabled"
  print service1
  sessionMBean.activateSession(sessionName, service1)
print
disconnect()
exit()
-------------------------------------------------------------------------------------------------------------------

Note: change the username, password and URL according to your environment.


2) Create a file ProxyOperation.sh with below content


--------------------------------------------------------------------------------------------------------------------
#!/bin/sh


export LOGFILE="/Mylocation/ProxyOperation/ProxyOperation.log"
if [ -f $LOGFILE ]; then
  rm -f $LOGFILE
fi
rm -rf /Mylocation/ProxyOperation/ProxyOperation.log
WL_HOME="wl_home"
export WL_HOME
OSB_HOME="osb_home"
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/sb-kernel-api.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/modules/com.bea.common.configfwk_1.2.1.0.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/alsb.jar
export CLASSPATH=$CLASSPATH:$OSB_HOME/Oracle_OSB/lib/sb-kernel-impl.jar
echo "Please enter operation you want to perform"
read PARAMETER1
cd /Mylocation/ProxyOperation/
sh ${WL_HOME}/common/bin/wlst.sh  /Mylocation/ProxyOperation/ProxyOperation.py $1 $2 $PARAMETER1 >> /Mylocation/ProxyOperation/ProxyOperation.log

---------------------------------------------------------------------------------------------------------------------


Note: 
a) Mylocation: direcotry location where you will place the above files.
b) Change the wl_home and osb_home according to your environment.


How to run:


Suppose path of your proxy service is as below (you can find this path from sbconsole)

Proxy service path: MyServices/CustomerProduct/Services/ProxyServices/Source/PS_Customer_Service
here proxy name is   PS_Customer_Service

now the command to be executed is as below:
sh ProxyOperation.sh  <MyServices/CustomerProduct/Services/ProxyServices/Source>  <PS_Customer_Service>
press enter

Please enter operation you want to performtype disable/enable(case sensitive)
press enter

your proxy will get disable or enable depending upon the operation you specify.

Thanks a lot for your patience!!!

Regards
-Ashish



Monday 16 May 2016

blogger

[WebLogic Server 12.2.1.0.0]Not able to Log in into the service bus using the User from Active Directory


Hello Viewer,

I have configured the Active Directory with the OSB Domain , I was able to Log in into the Administration Console and Em using the User Present in the Active directory . But when i was trying to Log in into the Service Bus i was getting the Below 


Error : [2016-05-11T21:59:32.400-07:00] [AdminServer] [ERROR] [ADFC-50017] [oracle.adfinternal.controller.application.AdfcExceptionHandler] [tid: [ACTIVE].ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: peshadab] [ecid: 6e20bceb-cc66-4090-a6c7-a87d1b4673ea-00001c2d,0] [APP: service-bus] [partition-name: DOMAIN] [tenant-name: GLOBAL] [DSID: 0000LIZKqMDCwktDwf3FCW1NCTgV00000C] ADFc: While attempting to handle this exception the application's exception handler failed.[[ oracle.adf.controller.security.AuthorizationException: ADFC-0619: Authorization check failed: User 'username' does not have 'VIEW' permission on 'jsf.resourcesPageDef'. at oracle.adf.controller.internal.security.AuthorizationEnforcer.handleFailure(AuthorizationEnforcer.java:203) at oracle.adf.controller.internal.security.AuthorizationEnforcer.internalCheckPermission(AuthorizationEnforcer.java:170) at oracle.adf.controller.internal.security.AuthorizationEnforcer.checkPermission(AuthorizationEnforcer.java:119) at oracle.adfinternal.controller.state.ControllerState.checkPermission(ControllerState.java:920) at oracle.adfinternal.controller.state.ControllerState.synchronizeStatePart2(ControllerState.java:730) at oracle.adfinternal.controller.application.SyncNavigationStateListener.afterPhase(SyncNavigationStateListener.java:85) at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.afterPhase(ADFLifecycleImpl.java:539) at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchAfterEvent(LifecycleImpl.java:124) at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchAfterPagePhaseEvent(Lif 
For the same kind of error few metalink note states that its a wrong JDK version issue. but since i am using wls 12.2.1.0.0 version for which according to cert matrix jdk 1.8 is certified version for my weblogic version.


Metalink note: OSB 12c - Weblogic Admin User Unable to Login to 12c Service Bus Console With Error 401--Unauthorized (Doc ID 1939789.1) 


Workaround :


Log on to EM -> Right Click domain_name -> Security -> Application Policies 
Search with the following options : Application Stripe : Service_Bus_Console Principal Type : Group Principal Name : Starts With : IntegrationAdministrators This will return 2 results , select the first one and choose "Create Like" 
In Grantee -> Click on Add -> Search Type : User 
Principal Name : Starts With : <username in ADSelect Ok Confirm the Information : A new security grant has been added successfully. Make sure that user belongs to "IntegrationAdmin" Role in WLS console Log on to sbconsole and this time you should be able to login with user in AD.


Thanks a lot for your patience!!!

Regards
-Ashish

Tuesday 10 May 2016

blogger

Script to create multiple workmanager in weblogic domain.


Hello Viewer,

I was asked to migrate the current weblogic resources to new weblogic domain as a part of upgrade project, among those weblogic resources there were around seventy workmanager with corresponding MaxThreadsConstraints.

I could manage to find the script on google for this task but only for single workmanager. So i tried to slightly tickle this script for managing this task of creating multiple workmanager with there corresponding MaxThreadsConstraints and MinThreadsConstraints in one go.

Below are steps to be followed.

1) Create a file with name createWorkManager.py with below content:

--------------------------------------------------------------------------------------------------------------
import sys
import os
import jarray
import dircache
from java.io import File
from java.io import FileInputStream
from java.lang import String

propInputStream = FileInputStream("details.properties")
configProps = Properties()
configProps.load(propInputStream)

domainName=configProps.get("domain.name")
adminURL=configProps.get("admin.url")
adminUserName=configProps.get("admin.userName")
adminPassword=configProps.get("admin.password")

totalWM_to_Create=configProps.get("total.WM")
#connection()
connect(adminUserName, adminPassword, adminURL)

edit()
startEdit()
print '======= Creating a WorkManager name as ======='
i=1
while (i <= int(totalWM_to_Create)) :

    try :
         cd('/')
         workManagerName=configProps.get("workManagerName."+ str(i))
         maxThreadConstraintName=configProps.get("maxThreadConstraintName."+ str(i))
         minThreadConstraintName=configProps.get("minThreadConstraintName."+ str(i))
         ServerName=configProps.get("ServerName."+ str(i))
         MaxThread=configProps.get("MaxThread."+ str(i))
         MinThread=configProps.get("MinThread."+ str(i))
         cd('edit:/SelfTuning/' + domainName + '/WorkManagers/')
         create(workManagerName,'WorkManagers')
         cd('edit:/SelfTuning/' + domainName + '/WorkManagers/' + workManagerName)
         cmo.addTarget(getMBean("/Clusters/"+ ServerName))
         save()
         print ' WorkManager Created...'
    
         print '======= Creating MaxThreadsConstraint ======='
         cd('edit:/SelfTuning/' + domainName + '/MaxThreadsConstraints/')
         try:
             create(maxThreadConstraintName,'MaxThreadsConstraints')
         except Exception:
             print 'Issue in Creating MaxThreads exiting'
         cd('edit:/SelfTuning/' + domainName + '/MaxThreadsConstraints/' + maxThreadConstraintName)
         cmo.addTarget(getMBean("/Clusters/"+ ServerName))
         set('Count',MaxThread)
         save()
    
         print '======= Creating MinThreadsConstraint ======='
         cd('edit:/SelfTuning/' + domainName + '/MinThreadsConstraints/')
         try:
             create(minThreadConstraintName,'MinThreadsConstraints')
         except Exception:
             print 'Issue In Creating MinThreads '
         cd('edit:/SelfTuning/' + domainName + '/MinThreadsConstraints/' + minThreadConstraintName)
         cmo.addTarget(getMBean("/Clusters/"+ ServerName))
         set('Count',MinThread)
         save()
    
         print '======= Assigning the MaxThreadConstraint to the WorkManager ======='
         cd('edit:/SelfTuning/' + domainName + '/WorkManagers/' + workManagerName)
         bean=getMBean('/SelfTuning/' + domainName + '/MaxThreadsConstraints/' + maxThreadConstraintName)
         cmo.setMaxThreadsConstraint(bean)
    
         print '======= Assigning the MinThreadConstraint to the WorkManager ======='
         cd('edit:/SelfTuning/' + domainName + '/WorkManagers/' + workManagerName)
         bean=getMBean('/SelfTuning/' + domainName + '/MinThreadsConstraints/' + minThreadConstraintName)
         cmo.setMinThreadsConstraint(bean)
    
         print '==> WorkManager Creation Finished ... Please Double Check from AdminConsole...'
    except:
        print '***** CANNOT CREATE Workmanager!!! Check If the Workmanager With the Name : ' , workManagerName ,' Alreday exists or NOT...'
        print ''
    i = i + 1
print '========================================='
save()
activate()
--------------------------------------------------------------------------------------------------------- 

2) create a file with name createWorkManager.sh with below content:

----------------------------------------------------------------------------------------------------------
#!/bin/sh

export LOGFILE="/Mylocation/createWM.log"
if [ -f $LOGFILE ]; then
  rm -f $LOGFILE
fi
rm -rf /Mylocation/createWM.log
WL_HOME="your weblogic_home"
export WL_HOME
cd /Mylocation/
sh ${WL_HOME}/common/bin/wlst.sh /Mylocation/createWorkManager.py >> /Mylocation/createWM.log
exit
-----------------------------------------------------------------------------------------------------------

Note: change wl_home and mylocation as per your environment and requirement. 

3) create a properties file with name "details.properties" which will have the details like below :

-----------------------------------------------------------------------------------------------------------
domain.name=DOMAIN_NAME
admin.url=t3://Adminhost:Adminport
admin.userName=username
admin.password=xxxxxxxxx

total.WM=2

ServerName.1=SOA_CLUSTER
MinThread.1=7
MaxThread.1=15
workManagerName.1=MyTestWorkManager1
maxThreadConstraintName.1=MyTestMaxThreadConstraint1
minThreadConstraintName.1=MyTestMinThreadConstraint1

ServerName.2=SOA_CLUSTER
MinThread.2=7
MaxThread.2=15
workManagerName.2=MyTestWorkManager2
maxThreadConstraintName.2=MyTestMaxThreadConstraint2
minThreadConstraintName.2=MyTestMinThreadConstraint2
---------------------------------------------------------------------------------------------------------------

Note:
a) total.WM = total number of workmanager you want to create.
b) Don't forget to add numeric suffix for every new entry.

4) Flow:

createWorkManager.sh ----> createWorkManager.py---------> details.properties

5) How to run :

a) Go to /Mylocation
cd /Mylocation/

b) execute the shell script:
sh createWorkManager.sh

Thanks a lot for your patience!!!

Regards
-Ashish

Sunday 1 May 2016

blogger

Email Notification from ORACLE MFT 12C(12.1.3.0.2)


Hello Viewer,

For an efficient support it is always a smart choice to make the work easier and productive.Oracle has provided new tool ORACLE MFT to manage the file transfers. But in case of any failed transfer , our system should be well equipped with the method which can give us an alert rather than keep on monitoring the console and wasting most of the time in sitting ideal like zombie.  

ORACLE MFT has a build in feature of email notification for different kind of events.In this blog i  will provide you the steps to enable notification for few of the events.
This is two step process:
1) configure the email driver configuration.
2) Enabling event , creating contact and associating this contact with event.

Step(1) 

             1) Goto EM console
             2) Expand User Messaging Service.
             3) Click on usermessagingdriver-email (mft_server1)> click on Email Driver properties from                    drop down list.
             4) click on create and provide the details:
                  essential field that you should know is :>
                  a) Outgoing Mail Server, Outgoing Mail Server port
                  b) Default sender Address
                  c) Outgoing Username and password(Make sure this user should be there in your security                        realm)
             5) After providing all the values click on OK  and logout. Login again and see the updated                      values should be there.

Steps(2) 
          
               1) Login to you MFT machine(node) on which you have installed it.
               2) run the ./wlst.sh
               3) connect to your MFT server using connect() wlst command and execute the below wlst                        commands.

              a)  connect('username','password',t3://Adminhost:MFTserverPORT)

              b)  updateEvent('RUNTIME_ERROR_EVENT', true)

              c)   createContact('Email', 'ABD@host.com') 

              d)   addContactToNotification('RUNTIME_ERROR_EVENT', 'Email',            'ABD@host.com') 

Note: Here i have given example taking one of the event there are many other as well.

1) RUNTIME_ERROR_EVENT
               This event tracks the errors occurred at runtime. For example:
                               • Any errors that occur during the message processing 
                               • Server start errors 
                               • System event failure errors
2) DEPLOY_ARTIFACT_EVENT
This event tracks the artifact deployment events.

etc...

Restart the managed server and replicate any error scenario in MFT transfers and check if you are receiving email on email id: ABD@host.com

Thanks a lot for your patience!!!

Regards
-Ashish