Use the following method to create a table configuration group and to add it to the whole set of groups:
public boolean createTableConfigurationGroup(String groupName, String descriptionID, String description, int dataCollectionType, int periodValue, int periodUnit, int reactOnCollectionFailure, Vector columnNames);
The following parameters are available:
· groupName – the name of the group. The length of this string must not exceed 40 characters, otherwise this group will not be sent to the CCMS.
· descriptionID – description IDs must be unique. The length of the string must not exceed 30 characters.
· description – a brief explanation about this group.
· dataCollectionType – defines the way the data is retrieved from the resource.
There are two possibilities:
¡ Passive reporting (the resource is triggered by timer) – in this case, use com.sap.engine.interfaces.monitor.MonitorConstants.POLLED_BY_MONITOR
¡ Active reporting (the resource sends notifications) – in this case, use com.sap.engine.interfaces.monitor.MonitorConstants.PUSHED_BY_RESOURCE
· periodValue – if dataCollectionType is POLLED_BY_MONITOR, this parameter defines the period value of polling data. If dataCollectionType is PUSHED_BY_RESOURCE, this parameter is ignored.
· periodUnit – if dataCollectionType is POLLED_BY_MONITOR, this parameter defines the unit of the period. There are three possibilities:
¡ com.sap.engine.interfaces.monitor.MonitorConstants.MINUTE
¡ com.sap.engine.interfaces.monitor.MonitorConstants.HOUR
¡ com.sap.engine.interfaces.monitor.MonitorConstants.DAY
If dataCollectionType is PUSHED_BY_RESOURCE, this parameter is ignored.
· reactOnCollectionFailure – defines how a monitor belonging to this group must react when the resource fails.
There are two possibilities:
¡ com.sap.engine.interfaces.monitor.MonitorConstants.UNREGISTER_MONITOR
¡ com.sap.engine.interfaces.monitor.MonitorConstants.IGNORE
· columnNames – a vector containing the names of the columns in this table.
This method returns true if the group is created and added to the whole set of groups successfully; otherwise it returns false.
Vector columnNames = new Vector(); columnNames.add("name1"); columnNames.add("name2"); boolean result = monitorContext.createTableConfigurationGroup(tableGroupName, "TEST.TABLE.GROUP", "Test table configuration group", MonitorConstants.POLLED_BY_MONITOR, 8, MonitorConstants.MINUTE, MonitorConstants.UNREGISTER_MONITOR, columnNames);
|