
The customization is done using the ConfigurationService MBean.
To start using this MBean, you need to connect to the MBean Server:
configurationServiceObjectName = ObjectNameFactory.getNameForServerChildPerNode("Services", "MonitorConfigurationService", null, null);
mbs = MonitorServiceRuntime.getMBeanServer();You can then use all the available methods of this MBean to customize your configuration. The rest of this document contains a list with the actions you can perform, the available methods for these actions, and examples of how to use these methods.
publicvoidsetDescription(String configGroupName, String newDescription) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setDescription",
new Object[] { groupName, description },
new String[] { "java.lang.String", "java.lang.String" });
public void setAutoreactionMethod(String configGroupName, String methodName) throws Exception;
public void setAnalysisMethod(String configGroupName, String methodName) throws Exception;
public void setDataCollection(String configGroupName, int setPeriodUnit, int value, int reactOnCollectionFailure) throws Exception;
public void setReactOnCollectionFailure(String configGroupName, int reactOnCollectionFailure) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setReactOnCollectionFailure",
new Object[] { groupName, new Integer(newValue)},
new String[] { "java.lang.String", "int" });
public void setPeriod(String configGroupName, int value, int unit) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setPeriod",
new Object[] { groupName, new Integer(value), new Integer(unitValue)},
new String[] { "java.lang.String", "int", "int" });
public void setPeriodValue(String configGroupName, int value) throws Exception;
public void setPeriodUnit(String configGroupName, int unit) throws Exception;
public void setThresholds(String configGroupName, int greenToYelowValue, int yellowToRedValue, int redToYellowValue, int yellowToGreenValue) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setThresholds",
new Object[] {
groupName,
new Integer(g2y),
new Integer(y2r),
new Integer(r2y),
new Integer(y2g)},
new String[] { "java.lang.String", "int", "int", "int", "int" });
public void setThresholdsGreenToYellow(String configGroupName, int value) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setThresholdsGreenToYellow",
new Object[] { groupName, new Integer(newValue)},
new String[] { "java.lang.String", "int" });
public void setThresholdsYellowToRed(String configGroupName, int value) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setThresholdsYellowToRed",
new Object[] { groupName, new Integer(newValue)},
new String[] { "java.lang.String", "int" });
public void setThresholdsRedToYellow(String configGroupName, int value) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setThresholdsRedToYellow",
new Object[] { groupName, new Integer(newValue)},
new String[] { "java.lang.String", "int" });
public void setThresholdsYellowToGreen(String configGroupName, int value) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setThresholdsYellowToGreen",
new Object[] { groupName, new Integer(newValue)},
new String[] { "java.lang.String", "int" });
public void setAlertRelevantValueType(String configGroupName, int type) throws Exception;
public void setGreenStates(String configGroupName, String[] states) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setGreenStates",
new Object[] { groupName, states },
new String[] { "java.lang.String", String[].class.getName()});
public void setYellowStates(String configGroupName, String[] states) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setYellowStates",
new Object[] { groupName, states },
new String[] { "java.lang.String", String[].class.getName()});
public void setRedStates(String configGroupName, String[] states) throws Exception;
mbs.invoke(
configurationServiceObjectName,
"setRedStates",
new Object[] { groupName, states },
new String[] { "java.lang.String", String[].class.getName()});
public void setStates(String configGroupName, String[] greenStates, String[] yellowStates, String[] redStates) throws Exception;
public void setStates(String configGroupName, String[][] states) throws Exception;
public void setAlertMode(String configGroupName, int value) throws Exception;
public void restoreDefaultConfiguration(String configGroupName) throws Exception;
public void restoreAllDefaultConfigurations() throws Exception;