9 Working with CPU Utilization-enabled Discovery

This chapter explains how to design a discovery action that allows Oracle Communications Network Integrity to discover devices based on their CPU utilization.

About CPU Utilization-enabled Discovery

CPU utilization-enabled discovery provides the mechanism to manage the discovery of devices based on their CPU utilization. This is an optional feature that enables you to configure the CPU utilization threshold value in cartridges, which enables the scan to skip the devices that are running above the specified CPU utilization threshold value.The NetworkIntegritySDK cartridge project contains an abstract action with two processors and one scan parameter group that constitute the framework for CPU utilization-enabled discovery. See "Action and Processors" and "Scan Parameter Groups and the Network Integrity UI" for more information.Using Design Studio for this feature, extend cartridges to run discovery using the Abstract CPU Utilization Discovery action.After you deploy your cartridges with the new implementation into the run-time application, users of Network Integrity can configure scans that discover only those devices that are running below the user-specified CPU utilization threshold value.

About CPU Utilization-enabled Discovery Solution

This section describes the components and the framework that make up the incremental TMF814 discovery. Also, this section identifies reference implementations that you can use as examples to help create your own solution.

Action and Processors

The NetworkIntegritySDK cartridge project contains an abstract discovery action called Abstract CPU Utilization Discovery, which contains the framework for CPU utilization-enabled discovery.

The Abstract CPU Utilization Discovery action has the following processors:

  • CPU Property Initializer: This processor initializes the cpuProperties file that contains the deviceCPUValue variable, which is required to store the CPU utilization value of the device obtained by the network.

  • CPU Utilization Compare Processor: This processor is responsible for comparing the user-specified threshold value with the CPU utilization value of the device obtained by the network.

About the Mechanism of Comparing CPU Usage Values

The NetworkIntegritySDK cartridge project contains the framework that compares the CPU utilization threshold value specified by the user and the CPU utilization value obtained from the network device. The user-specified CPU utilization threshold value is obtained by the CPU Utilization Parameters scan parameter group. The Device CPU Set Processor uses the cpuProperties file to set the CPU value of the device in the deviceCPUValue variable. This value is used as an input for the CPU Utilization Compare Processor to compare the CPU utilization value specified by the user and that of the device.

Scan Parameter Groups and the Network Integrity UI

A new scan parameter group, CPU Utilization Parameters, has been added in the NetworkIntegritySDK cartridge. The CPU Utilization Parameters scan parameter group is available for selection in the Select Parameter Group list under the Scan Action Parameters area.

In the Network Integrity UI Scan Configuration screen, selecting the CPU Utilization Parameters scan parameter group displays the CPU Utilization % field, which enables you to specify the CPU utilization threshold value between 1 to 99.

Reference Implementations

The Network Integrity Cisco Router and Switch SNMP cartridge demonstrates a complete reference implementation of discovery based on CPU utilization. The Cisco Router and Switch SNMP cartridge includes the CPU Utilization Parameters scan parameter group from the NetworkIntegritySDK cartridge. See Network Integrity Cisco Router and Switch SNMP Cartridge Guide for more information.

Implementing CPU Utilization-enabled Discovery

This section assumes that you already have valid, deployable cartridges that perform discovery, import, and discrepancy detection, to which you are adding CPU utilization-enabled discovery. You can implement CPU utilization-enabled discovery in a sealed cartridge solution.

Implementing CPU Utilization-enabled Discovery in a Sealed Cartridge Solution

You can implement CPU utilization-enabled discovery for any device that supports polling for CPU utilization.

See the Design Studio for Network Integrity Help for information about any of the steps in this section.

To implement CPU utilization-enabled discovery when working with a sealed cartridge:

  1. Create a new cartridge.

  2. Add the following dependencies to the new cartridge:

    • All sealed and unsealed cartridges being extended by the new cartridge

      Note:

      The new cartridge needs to extend a discovery action and a discrepancy detection action. These actions may belong to one or more cartridges. At least one of these cartridges is sealed.
    • ora_ni_uim_device

    • NetworkIntegritySDK

    • Address Handler

  3. Create a new discovery action in the new cartridge.

  4. For the new discovery action:

    • Specify IPAddressHandler as the address handler.

    • Specify Device as the result category.

    • Add discoveryAction as a processor.

      Where discoveryAction is a discovery action from another cartridge.

    • Add Abstract CPU Utilization Discovery action as a processor.

    • Add the CPU Utilization Parameters scan parameter group.

    • Add or create any additional scan parameter groups required to configure the new discovery action.

    • Add new processors to obtain the CPU usage value of the device from the network. Set the deviceCPUValue variable in cpuProperties file for the Device CPU Set Processor as follows:

      request.getCpuProperties().setDeviceCPU(deviceCPUValue); 
      

      This sets the value of the deviceCPUValue variable, which is used by the CPU Utilization Compare Processor (from NetworkIntegritySDK cartiridge) to compare the user-specified CPU utilization threshold value with CPU utilization value (set in deviceCPUValue variable) of the device.

  5. Complete and customize the incremental discovery implementation for the new cartridge.

  6. Save and close all files.

  7. Build, deploy, and test your cartridge.