IBM Support

Tivoli Enterprise Portal sorts columns incorrectly

Troubleshooting


Problem

There can be cases where some columns are sorted incorrectly in the TEP, when clicking on the column header.

Symptom

Integer attributes (32-bit and 64-bit) can have a wrong sorting behavior in the TEP. You can encounter this for any agent, but especially Agent Builder agents can suffer from this.

For example, this is for the Log File agent, when sorting the 'Num Records Processed' column:

image-20180903102850-1

Now, when doing the same for the 'Num Records Not Matched' column, you will see this:

image-20180903102957-2

As you can see, 'Num Records Processed' sorts the integers correctly, while 'Num Records Not Matched' does not sort correctly.

Cause

The reason for this is that the failing attributes have enumerations defined, which will make the attributes behave like a STRING attribute instead of an INTEGER attribute. This is the default behavior.

Environment

Tivoli Monitoring agents

Diagnosing The Problem

Check the TEPS application support ODI files whether enumerations have been defined. These files are named dockxx (xx is the agent product code), and are located on the TEPS in:
Unix/Linux: $CANDLEHOME/<arch>/cq/data/
Windows: %CANDLE_HOME%\CNPS\

When you check the same attributes in the dockxx file for the Log File agent (which is called docklo), you will notice this:

*ATTR: Num_Records_Not_Matched
*COLUMN: RECUNMT
*TYPE: I,4
*BEHAV: COUNT
*ATOMIZE:
*ENUM: UNMATCH_LOG_NOT_ENABLED=-1
*OPTION: ATTR_DESCRIPTION=The number of processed records from this log which did not match any of the specified patterns.
*NLSID: KLO0000
The number of processed records from this log which did not match any of the specified patterns.

*ATTR: Num_Records_Processed
*COLUMN: RECPROC
*TYPE: I,4
*BEHAV: COUNT
*ATOMIZE:
*OPTION: ATTR_DESCRIPTION=The number of records processed from this log since agent start (including ones that are not matches/events).
*NLSID: KLO0000
The number of records processed from this log since agent start (including ones that are not matches/events).

Num_Records_Not_Matched has *ENUM defined, which means that this attribute has one enumeration, and therefore it will start behaving like a STRING attribute.
Num_Records_Processed has no enumeration defined, which means that it will still behave like an INTEGER attribute.

Resolving The Problem

The solution here is to edit the dockxx file, and add this line for the concerned attributes:
*OPTION:    SORTBYINTERNAL

This needs to be added before any other OPTION definition.

For the above attribute, it needs to become:
*ATTR: Num_Records_Not_Matched
*COLUMN: RECUNMT
*TYPE: I,4
*BEHAV: COUNT
*ATOMIZE:
*ENUM: UNMATCH_LOG_NOT_ENABLED=-1
*OPTION:    SORTBYINTERNAL
*OPTION: ATTR_DESCRIPTION=The number of processed records from this log which did not match any of the specified patterns.
*NLSID: KLO0000
The number of processed records from this log which did not match any of the specified patterns.

After the modification of the file, you will have to restart the TEPS.

Recently, we have seen this problem for attributes for the JDBC data source in the Agent Builder:
while retrieving the attributes/columns from the database server, it will add enumerations automatically to integer attributes, but the application support will not have the instruction to make them behave like integers but like strings. The workaround here is to edit itm_toolkit_agent.xml, and add this option:
force_raw_value_sort_in_tep="true"

Here's an example:
                <attribute cnp_name="PAUSIERT" column_id="PAUSIERT" force_raw_value_sort_in_tep="true" help_text="Data gathered from JDBC for column PAUSIERT " show_attr_cnp="true" tems_precision="22" tems_scale="1" tems_scale_transparent="true" version="1">
                    <isEnumeration size="9223372036854775807" type="is64BitGauge">
                        <enumeration_value enumeration_string="Value_Exceeds_Maximum" id="OVERFLOW_POSITIVE" string_value="9223372036854775807"/>
                        <enumeration_value enumeration_string="Value_Exceeds_Minimum" id="OVERFLOW_NEGATIVE" string_value="-9223372036854775808"/>
                        <enumeration_value enumeration_string="Error" id="ERROR_NOT_AVAILABLE" string_value="-1"/>
                        <enumeration_value enumeration_string="Missing data" id="MISSING_VALUE" string_value="-2"/>
                        <enumeration_value enumeration_string="No value" id="NULL_VALUE" string_value="-3"/>
                    </isEnumeration>
                    <jdbc_source metric_name="PAUSIERT"/>
                </attribute>

After the change, building the agent will make sure that the TEPS application support file is updated accordingly.

An option is planned for the Agent Builder to force the integer attributes to behave like integer attributes, even when enumerations are present.

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"SSZ8F3","label":"IBM Tivoli Monitoring V6"},"Component":"agent builder,log file agent","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.3","Edition":""}]

Product Synonym

itmv6,agent

Document Information

Modified date:
11 September 2018

UID

ibm10730161