DX Application Performance Management

 View Only
  • 1.  Custom message in ASM emails

    Broadcom Employee
    Posted Oct 02, 2024 05:36 PM

    Hi everyone. I set up a JMX script monitor that pings a specific page every 5 minutes. I want the contents of the page to be shown to the on-call engineer. In my JMX, I have a BeanShell assertion that looks like this:

    f (!ResponseCode.equals("200")) {
        Failure=true;
        FailureMessage=ResponseMessage;
    }

    The idea is that if the response code is not 200, the failure message becomes whatever message the website happens to show. When I tested this, I could not find the failure message anywhere in the email I received from ASM. 

    Is there any way to insert a customised message like this in emails or SMS messages from ASM?

    Thanks in advance



  • 2.  RE: Custom message in ASM emails

    Broadcom Employee
    Posted Oct 03, 2024 09:25 AM

    Hi Travis,

    Actually your assertion example should work as expected - for me, it'd send out "ALERT! Assertion Message Test: Assertion failure: INTERNAL SERVER ERROR" email on 500 Internal Server Error. That's pretty much what I understand you need. The ResponseMessage in the BeanShell is not the full body of the server reply, just the status line message. You can find full doc for the BeanShell Assertions here: https://jmeter.apache.org/usermanual/component_reference.html#BeanShell_Assertion

    There are some caveats to this, when there are more assertions failing, their failure messages get appended together and then truncated.

    ASM does not offer any means of customizing the email nor the SMS - this would enable attack vectors for malicious content injection.

    HTH,

    Tomas