WPM - Transaction - Show "Last Duration" in Seconds in alert


We have a few of WPM monitors set up, and we created a global Alert that gets triggered when the duration of the transaction has surpassed the number of seconds we pre-determined

When we use in the alert the ${N=SwisEntity;M=Transaction.LastDuration} variable it returns a number (Which is in milliseconds)


I tried to find a way to convert this number to seconds, as in to do some kind of a "Formula" in the Alert message display (For example something like this: ${N=SwisEntity;M=Transaction.LastDuration}/1000)

I found someone recommending doing it with an SQL query but it returns the next error: MACRO SQL ERROR - No column name was specified for column 1 of 'ipaz3f1g_jdh'

The SQL query was: ${N=SWQL;M=SELECT '${N=SwisEntity;M=Transaction.LastDuration}'/1000 }


tried to look for the location in the DB of this variable to make a different SQL quarry but couldn't find it

Any solutions on how convert milliseconds into seconds (Or in general do any math with variables in the alert message)


  • Main problem I'm seeing with the custom variable is you must give the column you did math on a named alias. Otherwise, the query will fail. 


        SELECT ROUND(LastDuration / 1000.0, 1) AS DurationInSeconds
        FROM SEUM_Transactions
        WHERE TransactionId = ${N=SwisEntity;M=TransactionId}

    or SWQL:

    ${N=SWQL;M=SELECT ROUND(([LastDuration]/1000.0),1) AS Seconds FROM Orion.SEUM.Transactions WHERE TransactionId =${N=SwisEntity;M=TransactionId} }