Topic
  • 5 replies
  • Latest Post - ‏2013-07-01T12:30:26Z by samanderson
samanderson
samanderson
172 Posts

Pinned topic DP failure email

‏2013-06-18T11:33:19Z |

Hi Frnds -

              Is this a good idea to send email from DP error rule every time this rule is fired ? Does it have any impact on performance? Are any one of you already doing it? are there any safety practices that needs to be followed when we do it on production?

Is there a better way to do it like ITCAM for soa etc... efficiently with less performance impact on DP?

  • swlinn
    swlinn
    1348 Posts

    Re: DP failure email

    ‏2013-06-18T13:24:16Z  

    I can't make a definitive comment on the performance impact of sending emails as I've not done this from the appliance, but I'd think if you do the send asynchronously it should not have any impact on the client response.  Note though that all resources of the individual transaction are held until the async action completes, so like any side call, the latency, in this case with your mail server, will dictate how long resources are held.  If it has a lot of latency, you could see memory issues under load.  Test and verify, place you system under load and measure the result if you want a definitive answer.

    One thing I've seen is to create a custom logging category, write a xsl:message using that category using the type attribute, and then have a snmp logging target subscribing to that custom logging category.  Assuming your SNMP config has a trap receiver destination configured, your receiver will be notified and can send out emails.

    Regards,

    Steve

  • HermannSW
    HermannSW
    4866 Posts

    Re: DP failure email

    ‏2013-06-18T16:00:16Z  

    You can use <dp:url-open> with SMTP URLs to send emails from within a stylesheet:
    http://pic.dhe.ibm.com/infocenter/wsdatap/v5r0m0/index.jsp?topic=%2Fcom.ibm.dp.xm.doc%2Fextensionfunctions43.htm


    Sending emails with attachments is not possible out-of-the-box, but described in this posting:
    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/smtp2

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

  • samanderson
    samanderson
    172 Posts

    Re: DP failure email

    ‏2013-06-19T12:35:10Z  
    • swlinn
    • ‏2013-06-18T13:24:16Z

    I can't make a definitive comment on the performance impact of sending emails as I've not done this from the appliance, but I'd think if you do the send asynchronously it should not have any impact on the client response.  Note though that all resources of the individual transaction are held until the async action completes, so like any side call, the latency, in this case with your mail server, will dictate how long resources are held.  If it has a lot of latency, you could see memory issues under load.  Test and verify, place you system under load and measure the result if you want a definitive answer.

    One thing I've seen is to create a custom logging category, write a xsl:message using that category using the type attribute, and then have a snmp logging target subscribing to that custom logging category.  Assuming your SNMP config has a trap receiver destination configured, your receiver will be notified and can send out emails.

    Regards,

    Steve

    Thnks Steve. This meant a lot. But sending email on failure is that an recommonded scenario for DP

  • HermannSW
    HermannSW
    4866 Posts

    Re: DP failure email

    ‏2013-06-19T13:13:05Z  

    Thnks Steve. This meant a lot. But sending email on failure is that an recommonded scenario for DP

    > But sending email on failure is that an recommonded scenario for DP
    >
    depends on what you will send in the email.

    By default DataPower returns a very gerneral SOAP fault.
    Details can only be seen in DataPower log.

    This is to give a possible attacker no information/feedback.


    Another question is why send email at all?
    If your request is send by a HTTP client the HTTP response is the natural place for returning information that a fault happened.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

  • samanderson
    samanderson
    172 Posts

    Re: DP failure email

    ‏2013-07-01T12:30:26Z  
    • HermannSW
    • ‏2013-06-19T13:13:05Z

    > But sending email on failure is that an recommonded scenario for DP
    >
    depends on what you will send in the email.

    By default DataPower returns a very gerneral SOAP fault.
    Details can only be seen in DataPower log.

    This is to give a possible attacker no information/feedback.


    Another question is why send email at all?
    If your request is send by a HTTP client the HTTP response is the natural place for returning information that a fault happened.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Hermann -

    >>Another question is why send email at all?

    This is to inform the support teams about the failure in transactions cause. Incase of network failures they can act real quick on it to have it restored rather than waiting for service consumer to complain and look at logs and identify it.