This discussion is archived
1 2 Previous Next 20 Replies Latest reply: Feb 22, 2013 5:46 AM by Roshni Shankar RSS

How to setup email notification on alerts in BTM console

Roshni Shankar Newbie
Currently Being Moderated
Hi ,

I want to know can we send notification from Oracle Business Transaction Management ? If yes then how can I send notification to the administrator say admin@<host_name>.com from BTM on any alerts(SLA or condition alert) I have configured email server hostname and the sender address in BTM console but how can I configure email notification on alerts from BTM console?

Thanks in advance!
  • 1. Re: How to setup email notification on alerts in BTM console
    AMcCollu Explorer
    Currently Being Moderated
    Hi,

    The alerts generated from the BTM console are of event type "Application Performance Management KPI Alert".
    To send notifications for these, use the Enterprise Manager notification features (outside of the BTM console).
    High level steps are:
    1) Specify SMTP gateway settings
    2) Create incident rule sets. As part of this process, you will create an event rule where you choose the event type "Application Performance Management KPI Alert". Also as part of this rule, you will specify the recipients of your email notifications. You can either specify direct email addresses and/or names of EM users. If you specify EM users, make sure that user has specified his/her email preferences and optionally a notification schedule. By default we create a 24x7 notification schedule for the user once he has specified his email address.

    Details of the above are documented in the Enterprise Manager doc available on OTN.
    Specifically, refer to the Notifications chapter of the EM 12c Administrtor's guide:
    http://docs.oracle.com/cd/E24628_01/doc.121/e24473/notification.htm#BABJFFCJ


    Regards,
    Ana
  • 2. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Hi Ana,

    Is this means that without integrating BTM with OEM we can notify the administrator with the alerts generated by BTM?

    We can set up SMTP host name and email sender in BTM console also so don't we have any mechanism in BTM to notify the administrator via email with the alert generated by BTM?

    Please guide!
  • 3. Re: How to setup email notification on alerts in BTM console
    AMcCollu Explorer
    Currently Being Moderated
    Hi,

    I've checked with the BTM team. It sounds like you may be using BTM standalone (not integrated with Enterprise Manager) e.g. older version of BTM prior to 12.1.0.3? If so, you can use the email notifications in BTM. The manual describes how to setup the BTM Notifier Service to send emails, and after that you need to subscribe to BTM SLA and Condition alerts for which you want emails to be sent.
    The online help and manual describes how to do this email setup.... have you checked them?
    Here is the link to setting up email in BTM from BTM online help 12.1.0.2:
    http://docs.oracle.com/cd/E24628_01/doc.121/e26585/commands049.htm#sthref734

    Regards,
    Ana
  • 4. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Hi Ana,

    I am using BTM 12.1.0.3 and followed the document BTM online help e37014 document for reference. I set-up email server in BTM host. I used the command document provided in the document otself for subscribing condition alert.

    <ap:registerSubscription
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <ap:subscription name="All Exception Alerts" enabled="true" userID="testID">
    <ap:deliveryMechanism>
    <ap:sendEmail format="long" style="html">
    <ap:from>BTM.TEST@oracle.com</ap:from>
    <ap:recipient type="TO">your.name@yourdomain.com</ap:recipient>
    </ap:sendEmail>
    </ap:deliveryMechanism>
    <ap:notificationFilters>
    <ap:source>
    <ap:value>ExM</ap:value>
    <ap:operation>in</ap:operation>
    </ap:source>
    </ap:notificationFilters>
    </ap:subscription>
    </ap:registerSubscription>

    and executed sendToNotifier command as follows

    First set the JAVA_HOME as export JAVA_HOME=<java_location>/jre

    Then from the /BTM_Servers_12.1.0.3.0/tools diractory location executed the following command

    *./btmcli.sh sendToNotifier -i <command_document_name>.xml -s http://<host>:<port>/btmcentral/sphere -l weblogic:welcome1* and it gave me the following error message

    *"The prefix "ap" for element "ap:registerSubscription" is not bound."*

    com.amberpoint.util.soa.types.SOAException: An unexpected exception occurred in the service at notifier while Agent service exception. The underlying exception is org.w3c.dom.DOMException: The prefix "ap" for element "ap:registerSubscription" is not bound.. Please report this error to Oracle.

    Is this not possible in BTM 12.1.0.3. Can't BTM 12.1.0.3 standalone be used for sending email notifications?

    Please guide!

    Edited by: Roshni Shankar on Jan 31, 2013 9:03 PM
  • 5. Re: How to setup email notification on alerts in BTM console
    AMcCollu Explorer
    Currently Being Moderated
    Hi,

    I checked with the BTM team. Here is the response I received:

    The problem with your XML is that it is not complete. Unfortunately, the snippet of XML that you copied from the documentation does not include the necessary namespaces that it should. If you went down a bit further in the documentation you would have found a more complete example.

    Go to this link: http://docs.oracle.com/cd/E24628_01/doc.121/e37014/commands049.htm#sthref575


    Look at the example and you will see:

    <ap:registerSubscription xmlns:ap="http://namespace.amberpoint.com/amf"

    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"

    xmlns:xsd="http://www.w3.org/1999/XMLSchema"

    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">


    The key setting is for the “ap” namespace.



    Regards,
    Ana
  • 6. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Hi Ana,

    Thanks for the document!

    I modified my command document and after that when I executed the sendToNotifier command I got the following message

    *./btmcli.sh sendToNotifier -i <command_document_name>.xml -s http://<btm_host>:<Port>/btmcentral/sphere -l weblogic:welcome1*

    <?xml version="1.0" encoding="UTF-8"?>
    <ap:registerSubscriptionResponse xmlns:ap="http://namespace.amberpoint.com/amf" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/>

    Can you please confirm is this the required conformation message?

    Also when I set-up the EMAIL notification in my BTM console I followed the following steps which were mentioned in the BTM online help document from Oracle (e37014)

    1. Select System Services from the Navigator and select AP_Notifier_Service from the services listed in the summary area.
    2. Edit its setup data (from the Admin menu) to specify the mail host and the email sender to be used.

    I entered the smtp server host and the sender email address but here my query is don't we need to provide the port for the smtp mail server

    I provided the following details: Mail Host: IP address of the mail server
    Email Sender: Mail Address of the sender

    Do we need to provide some more information( ports etc) to get email notification working?

    Please guide!
  • 7. Re: How to setup email notification on alerts in BTM console
    Kenneth Leonard-Oracle Newbie
    Currently Being Moderated
    Hi Roshni,

    You don't say if you are still having a problem.

    The BTM UI does not accept a port number for email. It assumes you are using the default port.

    You should open an SR with BTM support if you continue to have problems with this and we can help you.

    I have never tested what I am about to describe. The following workaround if from a very old note on the old BTM product that Oracle does not sell anymore but it might still work:

    The Performance administration page does not allow you to specify an alternate port when configuring your SMTP server settings. However, you can set the SMTP port with a property in your JVM.

    Add this Java property to the startup command for the Performance server's JVM:

    -Dcom.amberpoint.email.mail.smtp.port=<newSMTPPort>
  • 8. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Hi,

    Thanks for your help but can you please confirm the output which I am getting on executing sendToNotifier command is correct or not?

    ./btmcli.sh sendToNotifier -i <command_document_name>.xml -s http://<btm_host>:<Port>/btmcentral/sphere -l weblogic:welcome1

    I am getting the following message on executing the above command. Is this output message correct? Please confirm!

    <?xml version="1.0" encoding="UTF-8"?>
    <ap:registerSubscriptionResponse xmlns:ap="http://namespace.amberpoint.com/amf" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/>
  • 9. Re: How to setup email notification on alerts in BTM console
    Kenneth Leonard-Oracle Newbie
    Currently Being Moderated
    The response you are getting is correct. If you do not think that the subscription command ran successfully then ask for your subscriptions back with the following command:
    btmcli sendToNotifier -s http://localhost:4040/btmcentral/sphere/ -l admin:admin -i getSubs.xml
    where getSubs.xml contains:
    <ap:getSubscription xmlns:ap="http://namespace.amberpoint.com/amf"/>

    Ken
  • 10. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Thanks a lot!!

    One more thing which I want to ask is when I create subscribtion once with sendToNotifier command is it forever?? This means whenever a condition alert will be produced the subscribed email Id will get a notification?
  • 11. Re: How to setup email notification on alerts in BTM console
    Kenneth Leonard-Oracle Newbie
    Currently Being Moderated
    Yes, the subscriptions are permanent. That is, they will stay in effect until your alter or delete them.

    Ken
  • 12. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Hi ,

    Thanks a lot!! It worked!!

    Now I have query that suppose if I want to generate notifications only for a specific transaction. Is is possible? If yes, then can you please explain how can I avhieve this? I have written one command document but this is not working

    <ap:registerSubscription xmlns:ap="http://namespace.amberpoint.com/amf"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <ap:subscription name="All Exception Alerts" enabled="true" userID="testID">
    <ap:deliveryMechanism>
    <ap:sendEmail format="long" style="html">
    <ap:from><sender_address></ap:from>
    <ap:recipient type="TO"><recipient_address></ap:recipient>
    </ap:sendEmail>
    </ap:deliveryMechanism>
    <ap:notificationFilters>
    <ap:source>
    <ap:value>ExM</ap:value>
    <ap:value>ALSM</ap:value>
    <ap:value>System</ap:value>
    <ap:operation>in</ap:operation>
    </ap:source>
    </ap:notificationFilters>
    <ap:notificationFilters>
    <ap:info>
    <ap:name>com.amberpoint.notification.objectType</ap:name>
    <ap:value>Transaction</ap:value>
    <ap:operation>in</ap:operation>
    </ap:info>
    </ap:notificationFilters>
    <ap:notificationFilters>
    <ap:info>
    <ap:name>com.amberpoint.notification.transactionId</ap:name>
    <ap:value>uuid:A6141700-5ED7-11E2-9D11-FD9DE707B7CE</ap:value>
    <ap:operation>in</ap:operation>
    </ap:info>
    </ap:notificationFilters>
    </ap:subscription>
    </ap:registerSubscription>

    But this is not working as alert is getting notified for all other transactions.

    I have one other query also that when I got the email alert it has a link "View" in the email body. When I open this link it is giving the following message

    Unknown Host
    Description: Unable to locate the server named <server_host_name>

    Can you figure out what went wrong?

    Thanks a lot!!
  • 13. Re: How to setup email notification on alerts in BTM console
    Kenneth Leonard-Oracle Newbie
    Currently Being Moderated
    You should talk to your network people about the host name problem. They should be able to figure out what is wrong.

    If you open an SR with Oracle Support I can dive deeper into your current problem and work through your exact requirements. Here is the subscription I used when I last setup a transaction alert. I have not tested it for a while.

    Ken

    <ap:registerSubscription xmlns:ap="http://namespace.amberpoint.com/amf">
    <ap:subscription enabled="true" name="SLA Alerts on My Txn" userID="johnSmith"
    xmlns:ap="http://namespace.amberpoint.com/amf"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:tns="urn:com.amberpoint.notifier.server.configuration" xmlns:xsd="http://www.w3.org/1999
    /XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
    <ap:deliveryMechanism>
    <ap:sendEmail format="long" style="html">
    <ap:from>testFromSub@somewhere.com</ap:from>
    <ap:recipient type="TO">janeDoe@someplace.com</ap:recipient>
    </ap:sendEmail>
    </ap:deliveryMechanism>
    <ap:notificationFilters>
    <ap:source>
    <ap:value>ExM</ap:value>
    <ap:operation>in</ap:operation>
    </ap:source>
    <ap:severity>
    <!-- subcribe to WARNING and FAILURE alerts -->
    <ap:value>WARNING</ap:value>
    <ap:value>FAILURE</ap:value>
    <ap:operation>in</ap:operation>
    </ap:severity>
    <ap:info>
    <ap:name>correlationName</ap:name>
    <!-- subcribe to tx by friendly name-->
    <ap:value>Friendly_Name_of_my_Txn</ap:value>
    <ap:operation>in</ap:operation>
    </ap:info>
    </ap:notificationFilters>
    </ap:subscription>
    </ap:registerSubscription>
  • 14. Re: How to setup email notification on alerts in BTM console
    Roshni Shankar Newbie
    Currently Being Moderated
    Hi Ken,

    How can I find out Friendly_Name of my transaction? Also what is this <ap:name>correlationName</ap:name> in the xml you posted? What is correlationName?

    Edited by: Roshni Shankar on Feb 5, 2013 8:30 PM
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points