Do some calculations during alert logging

While logging alerts we want to store the Alert Duration (CLEARED_TIMESTAMP - ACTIVE_TIMESTAMP) etc in the same table ie. ALERT_LOG.
1.Can we add more custom columns to the ALERT_LOG table.
2 Can we write some expressions while the alert is logged to update custom columns in this table.
One way is to use Triggers on the MSSQL Server side (our database) but that may adversely effect performance as the alert rate is very high.

Vipul SHah

Yes, you can add any additional columns to the table, but the alert system will not store additional data in it. You just need to make sure they have a default value.

You cannot make the alert system write anything to this additional column on its own. To do that you would have to use the Module SDK to add to the alert system or create a Transaction Group or Gateway script that checks the most recent row and updates the new column value.

If you are just adding a (CLEARED_TIMESTAMP - ACTIVE_TIMESTAMP) column, you can do this easily in any SQL query that is fetching data from the alert table. ie:SELECT cleared_timestamp, active_timestamp, (CLEARED_TIMESTAMP - ACTIVE_TIMESTAMP) as "difference" FROM alert_log