Create an alarm for some of the supported adapters by using the createAlarm() method. The adapter must be a child of an event adapter. Following are some adapters that support the createAlarm() method:
BMC Software Event Manager
IBM Micromuse Netcool
IBM Tivoli Enterprise Console (T/EC)
IBM Tivoli Enterprise Console (T/EC)+
Script
Universal
Alarms are associated with a specific integration (adapter) and the properties vary according to the adapter. After getting a reference to the adapter from any element generated by the adapter under the Elements hierarchy, use this method to create an alarm against the adapter. The format is:
adapter.createAlarm( "Formula", Flds, Vals, null );
Where,
Formula: The class of the alarm.
Flds: An array of alarm fields.
Vals: An array that matches Flds and contains the alarm values.
null: The last parameter is always null.
For example:
var mgrElement = formula.Root.findElement("script=Adapter%3A+NOC+-+Universal+Adapter/root=Elements"); var adapter = mgrElement.adapter; formula.log.info("Adapter: " + adapter); var fields = ["Summary","Class","Severity"]; var Vals = ["AlarmStorm detected for Class EMOS", "EMOS","Critical"]; adapter.createAlarm( "EMOS", fields, Vals, null );