Updating custom KMs

This section provides detailed steps to make your custom Knowledge Modules (KMs) compliant to BMC ProactiveNet Performance Management or TrueSight Infrastructure Management

Note

The following update instructions are applicable to PATROL Agent version 9.5 and later. 

Before you begin

Ensure that you have upgraded your Classic Console to version 3.6.00.01 of BMC PATROL Console for Windows.

To update a custom KM

  1. Update all KM files with release and revision number. For details, see KM directives.
  2. Update all the Knowledge Module List of files with meta data information. For details, see Creating a Knowledge Module List.
  3. Open the PATROL Console in the Developer mode, and load your custom KM.
  4. For all applicable Application Classes:
    1. Click the KM tab.
    2. Expand Application Classes to view all the loaded application classes.
    3. Right-click on the application class name and click on Properties.
    4. Click the Metadata tab.
    5. Ensure you provide all the following details:

      Items Description Sample
      Display Name The name of the instance as displayed on the BMC ProactiveNet Performance Management Operations console or TrueSight Infrastructure Management administrator console. NT_OS application class is named Windows Operating System.
      Monitor Type This defines the behavior of the application class. MONITOR, CONTAINER, etc.
      Monitor Category BMC ProactiveNet Performance Management or TrueSight Infrastructure Management uses the Monitor category specification for categorization. System, Database, Application, etc.
      CDM Class Name The name of the CDM (Common Data Model) class that corresponds to an application class. BMC_FileSystem, BMC_ComputerSystem, etc.
      Config Variables Additional configuration parameters for an instance. osType, osVersion, etc.


      For additional details, refer Static and Dynamic Metadata.

    6. To enable Monitoring Policy configuration, add configuration metadata in the Input tab. For example, see Example of input tab details for an Application Class.

    7. Save the KM.
  5. For all applicable Parameters:
    1. Click the KM tab in the PATROL Console in Developer mode.
    2. Expand Application Classes to view all the loaded application classes.
    3. Expand an application class to view all Global and Local entries.
    4. Expand the Global > Parameters to view all parameters in the application class.
    5. Right-click on the parameter name and click on Properties.
    6. Click the Metadata tab.
    7. Select all the applicable metadata options. For details, refer Static metadata.
    8. Save the KM.
  6. For all applicable Menu commands:
    1. Click the KM tab in the PATROL Console in Developer mode.
    2. Expand Application Classes to view all the loaded application classes.
    3. Expand an application class to view all Global and Local entries.
    4. Expand the Global > Commands.
    5. Expand Menu Commands to view all menu commands for an application class.

      Note

      Menu command ID is the unique ID of the command in the context of the KM. ID is either auto-generated or you can manually provide it as an input. PATROL Console displays Menu command for an application class only if Menu ID is available for Menu commands. It sends request with Menu ID to PATROL Agent as a function call. This function should be present in one of these libraries: <KMName>_<Auto Generated ID>.lib (auto-generated) or <KMName>_<Menu ID>.lib (manually generated). executes the request to create a PSL command as requires <APPNAME>_menu; <menuid>();.

    6. Right-click on the menu command and click on Properties.

      Note

      Ensure that you take a back up of the Command text before generating an automated ID.

    7. In the General tab, perform the following to generate the ID:
      1. For auto-generated ID:
        1. Select the Generate Auto ID option and click Yes.
          The auto generated id is displayed in the ID field and a function with the same name is created in the Command text.
        2. Click the Command tab.
        3. Write the logic of the menu in the Command text.
        4. Click Apply.

          Note

          When you select the auto-generated ID option, a psl file is created in the PATROL_CACHE\psl directory by PATROL Console.
          The naming convention used is "<KMName>_<Auto Generated ID>.psl". For example, NT_OS_MenuCmdFunc_8087042345.psl

        5. If you want to have inputs taken from a user through the BMC ProactiveNet Performance Management Operations console or TrueSight Infrastructure Management administrator console, write the input metadata in the Input tab. For example, see Example of input tab details for a Menu command.
          Ensure that Annotate option is not checked for input to work.
      2. For manually generated ID:
        1. Select the Generate Auto ID option and click Yes. Now, deselect the the Generate Auto ID option to add Menu ID manually.
        2. Enter Menu ID. 

        3. Create a PSL library with naming convention as "<KMName>_<Menu ID>.lib" and export the PSL function with same name as Menu ID. 

          Note

          When you manually provide an ID, PATROL Console does not create a library and you must create a PSL library.

        4. Click the Command tab.
        5. Write the logic of the menu in the Command text to be executed by PATROL Console.

    8. Click Apply.
    9. From the TrueSight console, if you want to execute a menu command automatically on the ALARM state:
      1. Select the Annotate option in the General tab. Ensure that no inputs are used for the menu command.
      2. Click Apply.
      3. The menu command will appear in the Event Rules list on the BPPM server.
      4. Associate this event rule to an event trigger. In this case the ALARM state trigger.
    10. Save the KM.
  7. Create a bundle with the newly created <ApplicationClassName>.xml file, menu command library files, and the XSD shipped with PATROL Console.
  8. Newly created .xml, and .km files (for example: ntos.xml, ntos.km) will be saved under PATROL cache directory c:\users\user name\patrol\knowledge. Copy these files from here to PATROL_HOME\lib\knowledge directory

Integrating with TrueSight Capacity Optimization

When integrating custom KMs with TrueSight Capacity Optimization, make the following changes:

  • Designate the EntityType parameter as configVariable in the KM application class XML.
    The EntityType configVariable is required to set all instances that convert to devices.
  • Use the PSL script to set EntityType values per instance.

Sample JSON file for integrating custom KMs

{
    "type": "Custom Platform KM",
    "entities": {
        "Custom Platform Host": {
            "dst_ent_type": "gen",
            "src_ent_cat": "DEVICE",
            "metric_configuration_key": "Custom Platform Host METRICS",
            "dst_top_level_entity": true,
            "dst_ent_cat": "SYS",
            "src_identification": {
                "src_identification_type": "CONFIGDATA",
                "src_identification_value": "Scale.ParentDevice",
                "src_monitor_type": "_PATROL__SCALE_PARENT_DEVICE",
                "src_identification_metric": "METAENTITYTYPE"
            },
            "lookup": [{
                    "type": "STRONG",
                    "fields": [{
                            "dst_field": "TOKEN_ID"
                        },
                        {
                            "dst_field": "HOSTNAME"
                        }
                    ],
                    "mapping": [{
                            "dst_field": "TOKEN_ID",
                            "src_field": "tokenId"
                        },
                        {
                            "dst_field": "HOSTNAME",
                            "src_field": "dnsname"
                        }
                    ]
                },
                {
                    "type": "WEAK",
                    "fields": [{
                        "dst_field": "NAME"
                    }],
                    "mapping": [{
                        "dst_field": "NAME",
                        "src_field": "dnsname",
                        "dst_field_modification_required": true,
                        "dst_field_modifier": {
                            "type": "remove_domain",
                            "value": "NAME"
                        }
                    }]
                },
                {
                    "type": "COMPATIBILITY",
                    "fields": [{
                        "dst_field": "_COMPATIBILITY_"
                    }],
                    "mapping": [{
                        "dst_field": "_COMPATIBILITY_",
                        "src_field": "dnsname",
                        "dst_field_modification_required": true,
                        "dst_field_modifier": {
                            "type": "remove_domain",
                            "value": "_COMPATIBILITY_"
                        }
                    }]
                }
            ],
            "children": [
                {
                    "entity_key": "Custom Platform Guest",
                    "dst_relation_type": "CONTAINS"
                }
            ]
        },
        "Custom Platform Guest": {
            "dst_ent_type": "gen",
            "src_ent_cat": "DEVICE",
            "metric_configuration_key": "Custom Platform Guest METRICS",
            "dst_ent_cat": "SYS",
            "src_identification": {
                "src_identification_type": "MONITORTYPE",
                "src_identification_value": "_PATROL__SCALE_PARENT_DEVICE/_PATROL__SCALE_DEVICE"
            },
            "lookup": [
                {
                    "type": "STRONG",
                    "fields": [
                        {
                            "dst_field": "TOKEN_ID"
                        },
                        {
                            "dst_field": "HOSTNAME"
                        }
                    ],
                    "mapping": [
                        {
                            "dst_field": "TOKEN_ID",
                            "src_field": "tokenId"
                        },
                        {
                            "dst_field": "HOSTNAME",
                            "src_field": "dnsname"
                        }
                    ]
                },
                {
                    "type": "WEAK",
                    "fields": [
                        {
                            "dst_field": "NAME"
                        }
                    ],
                    "mapping": [
                        {
                            "dst_field": "NAME",
                            "src_field": "dnsname",
                            "dst_field_modification_required": true,
                            "dst_field_modifier": {
                                "type": "remove_domain",
                                "value": "NAME"                
                            }
                        }
                    ]
                },
                {
                    "type": "COMPATIBILITY",
                    "fields": [
                        {
                            "dst_field": "_COMPATIBILITY_"
                        }
                    ],
                    "mapping": [
                        {
                            "dst_field": "_COMPATIBILITY_",
                            "src_field": "dnsname",
                            "dst_field_modification_required": true,
                            "dst_field_modifier": {
                                "type": "remove_domain",
                                "value": "_COMPATIBILITY_"                
                            }
                        }
                    ]
                }
            ]
        }
    },
    "metrics": {
        "Custom Platform Host METRICS": {
            "basic_metrics": [
                {
                    "src_monitor_type": "_PATROL__SCALE_PARENT_DEVICE",
                    "src_monitor_data_type": "perf",
                    "metrics": [{
                        "dst_metric": "UPTIME",
                        "src_metric": "UPTIME"
                        
                    }]
                },
                {
                    "src_monitor_type": "_PATROL__SWAP",
                    "src_monitor_data_type": "perf",
                    "filter_condition": {
                        "filter_type": "include",
                        "src_metric_name": "INSTANCE_NAME",
                        "src_metric_value": "Summary"
                    },
                    "metrics": [{
                            "dst_metric": "SWAP_SPACE_UTIL",
                            "src_metric": "SWPTOTSWAPUSEDPERCENT",
                            "formula": "SWPTOTSWAPUSEDPERCENT/100"
                        },
                        {
                            "dst_metric": "SWAP_SPACE_TOT",
                            "src_metric": "SWPTOTSWAPSIZE",
                            "formula": "SWPTOTSWAPSIZE*1024"
                        }
                    ]
                },
                {
                    "src_monitor_type": "_PATROL__UNIX_OS",
                    "src_monitor_data_type": "config",
                    "metrics": [{
                            "dst_metric": "CPU_MODEL",
                            "src_metric": "CPUTYPE"
                        },
                        {
                            "dst_metric": "OS_TYPE",
                            "src_metric": "OSTYPE"
                        },
                        {
                            "dst_metric": "OS_VER",
                            "src_metric": "OSVERSION"
                        },
                        {
                            "dst_metric": "CPU_NUM",
                            "src_metric": "CPUCOUNT"
                        }
                    ]
                },
                {
                    "src_monitor_type": "_PATROL__NETWORK",
                    "src_monitor_data_type": "perf",
                    "dst_suboject_mapping": "monInstName",
                    "filter_condition": {
                        "filter_type": "exclude",
                        "src_metric_name": "INSTANCE_NAME",
                        "src_metric_value": "%lo%"
                    },
                    "metrics": [{
                            "dst_metric": "BYIF_IN_PKT_RATE",
                            "src_metric": "NETPACKETSIN"
                        },
                        {
                            "dst_metric": "BYIF_OUT_PKT_RATE",
                            "src_metric": "NETPACKETSOUT"
                        },
                        {
                            "dst_metric": "BYIF_BIT_RATE",
                            "src_metric": "NETBYTESTOTALPERSEC",
                            "formula": "NETBYTESTOTALPERSEC*8"
                        }
                    ]
                }
            ]
        },
        "Custom Platform Guest METRICS": {
                "basic_metrics": [
                {
                    "src_monitor_type": "_PATROL__UNIX_OS",
                    "src_monitor_data_type": "config",
                    "metrics": [{
                            "dst_metric": "CPU_MODEL",
                            "src_metric": "CPUTYPE"
                        },
                        {
                            "dst_metric": "OS_TYPE",
                            "src_metric": "OSTYPE"
                        },
                        {
                            "dst_metric": "OS_VER",
                            "src_metric": "OSVERSION"
                        },
                        {
                            "dst_metric": "CPU_NUM",
                            "src_metric": "CPUCOUNT"
                        }
                    ]
                },
                {
                    "src_monitor_type": "_PATROL__SCALE_INSTANCE",
                    "src_monitor_data_type": "perf",
                    "dst_suboject_mapping": "monInstName",
                    "filter_condition": {
                        "filter_type": "exclude",
                        "src_metric_name": "INSTANCE_NAME",
                        "src_metric_value": "%lo%"
                    },
                    "metrics": [{
                            "dst_metric": "BYCPU_CPU_UTIL",
                            "src_metric": "CPU_Utilization"
                        }

                    ]
                }
            ]
        }
    }
}
Was this page helpful? Yes No Submitting... Thank you

Comments