Technical Blog Post
Abstract
Conversions for Time fields in Event Viewer & AEL
Body
One often received feedback item is on how OMNIbus WebGUI shows unset time fields in events as 00:00:00 Thursday, 1 Jan 1970. As OMNIbus uses Unix time (also known as POSIX or epoch time) for handling time fields in alerts.status, any unset time fields are initialised to 0 which maps to 00:00:00 Thursday, 1 Jan 1970 in Unix time.
With the introduction of WebGUI 8.1, both the Event Viewer & AEL were updated to support conversions on time fields in alerts.status. Using nco_sql you can define conversion strings for the 0 time value using the syntax:
insert into alerts.conversions values (KeyField, ColumnName, Value, Conversion);
Where KeyField is by convention a concatenation of ColumnName & Value. For example, to set the FirstOccurrence time field to show "Not Set Yet" when a 0 time value is present you could use:
insert into alerts.conversions values ('FirstOccurrence0', 'FirstOccurrence', 0, 'Not Set Yet');
Or for a custom field (TicketUpdate) recording when a ticket was last updated, something similar to:
insert into alerts.conversions values ('TicketUpdate0', 'TicketUpdate', 0, 'Not created yet');
After the WebGUI has re-synchronised the alerts.conversions table with the ObjectServer, both the Event Viewer and AEL will use the conversion (in this case "Not Set Yet") whenever a 0 time value is encountered. In a test environment, stopping & starting the DASH server will force a synchronisation if you do not wish to wait for the periodically scheduled operation to occur.
Event Viewer after conversion applied for 0 time value:
AEL after conversion applied for 0 time value:
Note: One limitation is the nco_config UI doesn't currently support editing conversions on time fields. So creation/modification of conversions for time fields needs to be carried out via nco_sql client on the alerts.conversions table.
UID
ibm11081455