DX Application Performance Management

 View Only
Expand all | Collapse all

Change the timestamp format of the 'Time' Command Parameter in Shell Command Action

  • 1.  Change the timestamp format of the 'Time' Command Parameter in Shell Command Action

    Broadcom Employee
    Posted Nov 24, 2015 08:51 PM

    Hi all, just like to find out if there is any way to change the timestamp format of the 'Time' Command Parameter when configuring Actions in the Management Module Editor?

     

    Shell command action Time Parameter.png

     

    For example, customer would like the date/time in the alert message to be in the format ‘dd/mm/yy hh:mm:ss’ in 24-hour clock without the AM/PM or time zone; e.g., ‘25/11/15 09:14:42’

    Shell command alert.png

    Is the format controlled by the System Locale settings? Or is there a way to override it from within APM?

     

    Thanks



  • 2.  Re: Change the timestamp format of the 'Time' Command Parameter in Shell Command Action
    Best Answer

    Posted Nov 24, 2015 09:39 PM

    Aryne,
    Using locale will change how the data is formatted for e.g whether month or day is reported first in the date ,but not likely yield exactly what customer wants and there doesn't seems to be a way OOB to override default DateFormat used by code. Anyways since we are passing it to a shell there are number of ways at shell level itself to convert date\timestamp reported by EM to whatever format customer wants for e.g http://stackoverflow.com/questions/6508819/convert-date-formats-in-bash , perhaps that's a better approach.

     

    Regards,

    Kulbir.



  • 3.  Re: Change the timestamp format of the 'Time' Command Parameter in Shell Command Action

    Broadcom Employee
    Posted Nov 25, 2015 10:36 PM

    Thanks Kulbir