Using the ExtendedAttr in the alerts.status table instead of the alerts.details table

The Netcool/OMNIbus Knowledge Library allows you to use the extended attribute field in the alerts.status table instead of, or in addition to, the alerts.details table to capture returned token values for the NcKL SNMP traps and SYSLOG events.

The ExtendedAttr column is a default column in the alerts.status table.

The alerts.details table has a limit of 4096 characters and therefore some tokens returned by the NcKL traps may be lost due to size limitations. Starting from NcKL version 4.0, NcKL records data into the ExtendedAttr column by default by using the nvp_add() function. If you wish to use the details() function to record data into the alerts.details table, you must enable the following variables in the snmptrap.rules file or syslog.rules file.
  • $OPTION_EnableDetails : This option enables the use of the details() function in all NcKL rules files, for example, $OPTION_EnableDetails = "1".
  • $OPTION_EnableDetails_vendor : This option enables the use of the details() function for the specific NcKL SNMP traps or SYSLOG events of the specified vendor. All tokens returned from the NcKL SNMP traps and SYSLOG events will appear in the alerts.details table.

    Where vendor is the name of the vendor directory in NcKL rules, for example, $OPTION_EnableDetails_empirix = "1"

To copy existing data from the alerts.details table into the ExtendedAttr column in the alerts.status table use the following example with nco_sql. This example creates a procedure called copy_details. To run the procedure use the execute command as shown:
--Create SQL procedure to copy details to Extended Attr
create or replace procedure copy_details() 
begin
   -- Copy all detail from alerts.details table to ExtendedAttr column in 
		alerts.status 
 	for each row det in alerts.details where det.Name != ''    
 begin
  update alerts.status set ExtendedAttr = nvp_set(ExtendedAttr,det.Name,det.Detail) 
	where Identifier = det.Identifier
 end;
end;
go

-- To run the procedure
execute copy_details
go
Note: Only rules contained in the Netcool/OMNIbus Knowledge Library prior to NcKL 4.0 are added to the alerts.details table with the above OPTION_EnableDetails variable. From NcKL 4.0, all rules files added to the Netcool/OMNIbus Knowledge Library only use the nvp_add() function. If you wish to use the alerts.details table with post NcKL 4.0 rules, you must customize the rules file to add the details() function.