DX Application Performance Management

  • 1.  Re: Customized email action :shell action

    Posted Oct 06, 2014 10:46 AM

    Hi Vaibhav,

     

    I am trying to create a shell script using mailx in Linux. How can you pass the message details from Wily to the script?

     

    Regards,

    Sanjeet



  • 2.  Re: Customized email action :shell action

    Posted Oct 15, 2014 09:36 AM

    Hi Sanjeet,

    You may find the parameters in "Shell Command Action" which you can import it into your script.

    It depends upon your script\mailx command where and what parameter you put those parameters.

     

    So for e.g. in mailx command, in SUBJECT part, you may pass "Alert Timestamp" and "Alert Name".

     

    Please let me know if you need more clarifications.

     

    Regards,

    Vaibhav



  • 3.  Re: Customized email action :shell action

    Posted Oct 18, 2014 10:26 AM

    Played around with it and figured out that the Command Shell action passes the parameters as per the added order in a numbered index starting from $1....in a script. This wasn't clear in the workstation doc.

     

    Thanks,

    Sanjeet



  • 4.  Re: Customized email action :shell action

    Broadcom Employee
    Posted Oct 18, 2014 12:49 PM


  • 5.  Re: Customized email action :shell action

    Posted Oct 20, 2014 02:54 PM

    Hi Sanjeet,

     

    Happy to see that you found the way.

    As a suggestion, on top of it, you can also set subject line with the status of the alert i.e. whether CAUTION, CLOSED or DANGER.

     

    To do that, you need to convert the %alert status% parameter into literal, because its value is in numbers.

    So for e.g. if alert is in danger, value of alert status parameter would be 3. So you need to convert it into some string say "DANGER" using IF commands.

    %alert Status% = 3 --> DANGER

                            = 2 --> CAUTION

                            = 1 --> CLOSED

    Let me know if needs more clarification.

     

    Regards,

    Vaibhav