Show TOC Start of Content Area

Background documentation Customization of Configuration Groups Using Third-Party Tools  Locate the document in its SAP Library structure

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.

Available Methods and Their Usage

...

       1.      Methods available for all configuration groups:

                            a.      Setting the description text:

public voidsetDescription(String configGroupName, String newDescription) throws Exception;

mbs.invoke(

   configurationServiceObjectName,

   "setDescription",

   new Object[] { groupName, description },

   new String[] { "java.lang.String", "java.lang.String" });

 

                            b.      Customize the autoreaction method. This method is called in case of an alert:

public void setAutoreactionMethod(String configGroupName, String methodName) throws Exception;

 

                            c.      Customize the analysis method. This method is called from the front-end to get a more detailed view on the selected problem.

public void setAnalysisMethod(String configGroupName, String methodName) throws Exception;

 

       2.      Methods available for all monitor configuration groups:

                            a.      Setting the group name, the period unit and the reaction on collection failure at once:

public void setDataCollection(String configGroupName, int setPeriodUnit, int value, int reactOnCollectionFailure) throws Exception;

 

                            b.      Setting reaction on collection failure:

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" });

 

       3.      Methods available for passive data supplier (only for pulled-by-monitor types):

                            a.      Setting the period through which the monitored data is retrieved from the monitored resource:

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" });

 

                            b.      Defines the integer value of the data collection period:

public void setPeriodValue(String configGroupName, int value) throws Exception;

 

                            c.      Defines the unit for the data collection period. The possible values are: minute, hour, day:

public void setPeriodUnit(String configGroupName, int unit) throws Exception;

 

       4.      Methods available only for performance configuration groups:

                            a.      Setting thresholds:

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" });

 

                            b.      Setting the GreenToYellow threshold:

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" });

 

                            c.      Setting the YellowToRed threshold:

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" });

 

                            d.      Setting the RedToYellow threshold:

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" });

 

                            e.      Setting the YellowToGreen threshold:

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" });

 

                              f.      Customize the alert relevant value type. This attribute specifies which value should be taken for threshold comparison (e.g. last reported value, average value of the last 15 minutes, and so on):

public void setAlertRelevantValueType(String configGroupName, int type) throws Exception;

 

       5.      Methods available only for state configuration groups:

                            a.      Setting the Green states:

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()});

 

                            b.      Setting the Yellow states:

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()});

 

                            c.      Setting the Red states:

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()});

 

                            d.      Setting all states at once:

public void setStates(String configGroupName, String[] greenStates, String[] yellowStates, String[] redStates) throws Exception;

 

                            e.      Setting all states at once (another approach):

public void setStates(String configGroupName, String[][] states) throws Exception;

 

                              f.      Setting the alert mode:

public void setAlertMode(String configGroupName, int value) throws Exception;

 

                            g.      Restoring the default configuration. The data is restored directly from the configuration XML, not from the database:

public void restoreDefaultConfiguration(String configGroupName) throws Exception;

 

                            h.      Restoring all configurations at once. The data is restored directly from the configuration XMLs, not from the database:

public void restoreAllDefaultConfigurations() throws Exception;

 

 

End of Content Area