27.6 Reevaluating Metric Collections Using EMCTL Commands

Use the following command to perform an immediate reevaluation of a metric collection:

emctl control agent runCollection <targetName>:<targetType> <colletionItemName>

where <collectionItemName> is the name of the Collection Item that collects the metric.

Related metrics are typically collected together; collectively a set of metrics collected together is called a Metric Collection. Each Metric Collection has its own name. If you want to reevaluate a metric, you first need to determine the name of the Metric Collection to which it belongs, then the CollectionItem for that Metric Collection.

When you run the command above to reevaluate the metric, all other metrics that are part of the same Metric Collection and Collection Item will also be reevaluated.

Perform the following steps to determine the Metric Collection name and Collection Item name for a metric:

  1. Go to $INSTALL_BASE/ngagent/plugins directory, where $INSTALL_BASE is the root of the installation. The Oracle Home of the Management Agent exists in this directory.

  2. Locate the XML file for the target type. For example, if you are interested in the host metric 'Filesystem Space Available(%)' metric, look for the host.xml file.

  3. In the xml file, look for the metric in which you are interested. The metric that you are familiar with is actually the display name of the metric. The metric name would be preceded by a tag that started with:

    <Label NLSID=

    For example, in the host.xml file, the metric 'Filesystem Space Available(%)" would have an entry that looks like this:

    <Label NLSID="host_filesys_pctAvailable">Filesystem Space Available (%) </Label>
    
  4. Once you have located the metric in the xml file, you will notice that its entry is part of a bigger entry that starts with:

    <Metric NAME=

    Take note of the value defined for "Metric NAME". This is the Metric Collection name. For example, for the 'Filesystem Space Available(%)' metric, the entry would look like this:

    <Metric NAME="Filesystems"

    So for the 'Filesystem Space Available(%)' metric, the Metric Collection name is 'Filesystems'.

  5. The Collection Item name for this Metric Collection needs to be determined next. Go to the $INSTALL_BASE/plugins/<plugin id directory, where $INSTALL_BASE is the Oracle Home of the Management Agent.

  6. In this directory, look for the collection file for the target type. In our example, this would be host.xml.

  7. In cases where a Metric Collection is collected by itself, there would be a single Collection Item of the same name in the collection file. To determine if this is the case for your Metric Collection, look for an entry in the collection file that starts with:

    <CollectionItem NAME=

    where the value assigned to the CollectionItem NAME matches the Metric NAME in step (4).

    For the 'Filesystem Space Available(%)' metric, the entry in the collection file would look like:

    <CollectionItem NAME = "Filesystems"

  8. If you find such an entry, then the value assigned to "CollectionItem NAME" is the collection item name that you can use in the emctl command.

  9. Otherwise, this means the Metric Collection is collected with other Metric Collections under a single Collection Item. To find the Collection Item for your Metric Collection, first search for your Metric Collection. It should be preceded by the tag:

    <MetricColl NAME=

    Once you have located it, look in the file above it for: <CollectionItem NAME=

    The value associated with the CollectionItem NAME is the name of the collection item that you should use in the emctl command.

    For example if the you want to reevaluate the host metric "Open Ports", using the previous steps, you would do the following:

    1. Go to the $INSTALL_BASE/plugins/<plugin id directory where $INSTALL_BASE is the Oracle Home of the Management Agent. Look for the host.xml file and in that file locate: <Metric NAME="openPorts".

    2. Then go to the $INSTALL_BASE/ngagent/plugins/default_collection directory. Look for the host.xml file and in that file look for <CollectionItem NAME="openPorts".

      Failing this, look for <MetricColl NAME="openPorts".

    3. Look above this entry in the file to find the <CollectionItem NAME= string and find <CollectionItem NAME="oracle_security".

    The CollectionItem NAME oracle_security is what you would use in the emctl command to reevaluate the Open Ports metric.