Performance

Oracle Communications Unified Assurance includes a library of devices for out-of-the-box polling support of useful metrics. Performance Common Object Model (PCOM) is used for retrieving various metrics that represent system performance. These metrics are represented as definitions in JSON format that define the Simple Network Management Protocol (SNMP) OIDs needed to satisfy basic polling functionalities like CPU, memory, disk, network, temperature, fan, interfaces, and so on.

Performance Support Workflow

Performance Support Workflow

Description of illustration performance-support-workflow.png

Performance support starts with Management Information Base (MIB) files. MIBs are structured collections of information in a hierarchical format that define the characteristics and status of network devices in the form of objects and object tables.

An object is a specific piece of data or resource that can be managed or monitored on a network device. These network devices are monitored using SNMP.

You must go through MIBs related to the devices you want to get metrics for, and find the relevant objects and object tables. PCOM curation is the process of adding relevant information from the MIB file to a PCOM file and arranging it in a proper manner. Once you have arranged objects in the PCOM file and configured them properly, the PCOM curation is complete and the file is ready to be tested.

There are two different flows for testing:

PCOM Schema and Definitions

A PCOM file consists of attributes like MIB objects, OIDs, metric types, factors, and filters that determine the specifics of the device performance information to be polled. The curation process involves setting appropriate values to these PCOM schema attributes.

See Example PCOM File for an example PCOM file.

The following are the top-level attributes present in a PCOM file, along with their definitions:

Object Definitions

The following are the attributes nested within the object attribute:

SNMP Definitions

The following are the attributes nested within the snmp attribute:

Value Definitions

Each object within the values attribute has the following fields:

Example PCOM File

To see the default PCOM files:

  1. Go to the Rules UI.

    From the Configuration menu, select Rules. See Rules in Unified Assurance User's Guide for more information on this UI.

  2. Expand the following folders:

    Core Rules (core)/Default read-write branch (default)/collection/metric/snmp/_objects/pcom

The following example is for reference only:

{
    "@vendor": "exampleCompanyA",
    "mibs": [
        "EXMP-COMPA-DEVICE-MIB"
    ],
    "notes": "Example Company A, bought by Example Company B.",
    "enterpriseOids": [
        "1.3.6.1.4.1.xxxx"
    ],
    "aliases": [
        "exampleCompanyB"
    ],
    "objects": [
        {
            "@objectName": "EXMP-COMPA-DEVICE-MIB::deviceMemUsage",
            "certification": "STANDARD",
            "class": "MEMORY",
            "description": "Memory information of the device.",
            "domain": "PERFORMANCE",
            "metaData": {
                "certified": false
            },
            "method": "snmp",
            "snmp": {
                "discovery": {
                    "name": "EXMP-COMPA-DEVICE-MIB::deviceMemUsage",
                    "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x"
                },
                "factor": 1024,
                "instance": null,
                "maximum": {
                    "name": "EXMP-COMPA-DEVICE-MIB::deviceMemUsageTotalMem",
                    "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x"
                },
                "values": [
                    {
                        "metricType": "Memory Used",
                        "name": "EXMP-COMPA-DEVICE-MIB::deviceMemUsageUsedMem",
                        "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x",
                        "valueType": "Gauge32",
                        "thresholds": [
                            "Memory High"
                        ]
                    },
                    {
                        "metricType": "Memory Free",
                        "name": "EXMP-COMPA-DEVICE-MIB::deviceMemUsageFreeMem",
                        "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x",
                        "valueType": "Gauge32"
                    }
                ]
            },
            "subClass": "USAGE",
            "weight": 3
        },
        {
            "@objectName": "EXMP-COMPA-DEVICE-MIB::flashMemUsage",
            "certification": "STANDARD",
            "class": "MEMORY",
            "description": "Memory information of the device.",
            "domain": "PERFORMANCE",
            "metaData": {
                "certified": false
            },
            "method": "snmp",
            "snmp": {
                "discovery": {
                    "name": "::flashMemUsage",
                    "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x"
                },
                "factor": 1024,
                "instance": null,
                "maximum": {
                    "name": "EXMP-COMPA-DEVICE-MIB::flashMemUsageTotalMem",
                    "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x"
                },
                "values": [
                    {
                        "metricType": "Memory Used",
                        "name": "EXMP-COMPA-DEVICE-MIB::flashMemUsageUsedMem",
                        "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x",
                        "valueType": "Gauge32",
                        "thresholds": [
                            "Memory High"
                        ]
                    },
                    {
                        "metricType": "Memory Free",
                        "name": "EXMP-COMPA-DEVICE-MIB::flashMemUsageFreeMem",
                        "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x",
                        "valueType": "Gauge32"
                    }
                ]
            },
            "subClass": "USAGE",
            "weight": 2
        },
        {
            "@objectName": "EXMP-COMPA-DEVICE-MIB::deviceCpuUsgTable",
            "certification": "STANDARD",
            "class": "CPU",
            "description": "CPU utilization of the device",
            "domain": "PERFORMANCE",
            "metaData": {
                "certified": false
            },
            "method": "snmp",
            "snmp": {
                "discovery": {
                    "name": "EXMP-COMPA-DEVICE-MIB::deviceCpuUsgEntry",
                    "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x"
                },
                "filter": [
                    {
                        "operator": "!=",
                        "property": {
                            "name": "EXMP-COMPA-DEVICE-MIB::deviceCpuUsage",
                            "oid": "1.3.6.1.4.1.x.x.xx.x.x.x.x"
                        },
                        "value": "0"
                    }
                ],
                "factor": null,
                "instance": {
                    "name": "EXMP-COMPA-DEVICE-MIB::deviceCpuUsgDescription",
                    "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x.x"
                },
                "maximum": 100,
                "values": [
                    {
                        "metricType": null,
                        "name": "EXMP-COMPA-DEVICE-MIB::deviceCpuUsgUserCpu",
                        "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x.x",
                        "valueType": "OCTET STRING"
                    },
                    {
                        "metricType": null,
                        "name": "EXMP-COMPA-DEVICE-MIB::deviceCpuUsgSystemCpu",
                        "oid": "1.3.6.1.4.1.xxxx.xxx.x.x.x.x.x.x.x",
                        "valueType": "OCTET STRING"
                    },
                    {
                        "metricType": "CPU Utilization",
                        "eval": "$deviceCpuUsgUserCpu[$i] + $deviceCpuUsgSystemCpu[$i]"
                    }
                ]
            },
            "subClass": "UTILIZATION",
            "weight": 2
        },
        {
            "@objectName" : "EXMP-COMPA-DEVICE-MIB::deviceInternalTemparature",
            "certification" : "STANDARD",
            "class" : "TEMPERATURE",
            "description" : "Internal temperature in the controller.",
            "domain" : "PERFORMANCE",
            "metaData" : {
                "certified" : false
            },
            "method" : "snmp",
            "notes" : "Display string in the format: '27.00 degrees Celsius (NORMAL)'",
            "snmp" : {
                "discovery" : {
                    "name" : "EXMP-COMPA-DEVICE-MIB::deviceInternalTemparature",
                    "oid" : "1.3.6.1.4.1.xxxxx.x.x.x.x.x.x"
                },
                "factor" : null,
                "filter" : null,
                "instance" : null,
                "maximum" : null,
                "values" : [
                    {
                        "metricType" : "Temperature",
                        "name" : "EXMP-COMPA-DEVICE-MIB::deviceInternalTemparature",
                        "oid" : "1.3.6.1.4.1.xxxxx.x.x.x.x.x.xx",
                        "valueType" : "OCTET STRING",
                        "processors" : [
                            {
                                "type" : "extract",
                                "data" : [
                                    "^(\\d+(?:\\.\\d+)?) degrees"
                                ]
                            }
                        ]
                    }
                ]
            },
            "subClass" : "VALUE",
            "weight" : 2
        }
    ]
}

PCOM Curation

PCOM curation is the process of converting a MIB to a pre-certified PCOM file. This is an entirely manual process which involves posing technical questions, obtaining answers, and subsequently generating the PCOM file.

Curation Process Flow

The curation process starts with three inputs:

The device IP can be used to generate the SNMP walk using the following command:

snmpwalk -v <SNMP-Version> -c <community-string> <IPAddress-of-simulated-device> <OID-Prefix-value> > <vendor>.<model>.walk

where the <OID-Prefix-value> specifies the starting OID for the walk. If this value is omitted, the walk starts from the root.

Taking these inputs into account, you need to consider the following points in order to get started with the curation process:

The steps involved in the curation process are:

Step 1: Finding Relevant MIB Objects

To find which MIBs and MIB objects are related to performance metrics, use the following command:

grep -R -i -E "(disc|disk|cpu|memory|store|storage|fan|packet|pkt|byte|octet|temp|psu|supply|battery|voltage|heap|temp|ram|mem|read|write|usage|capacity) OBJECT-TYPE" <path-to-MIB-files>

An example command and output snippet is:

$ grep -R -i -E "(disc|disk|cpu|memory|store|storage|fan|packet|pkt|byte|octet|temp|psu|supply|battery|voltage|heap|temp|ram|mem|read|write|usage|capacity) OBJECT-TYPE" /opt/assure1/ixia
/opt/assure1/ixia/EXMP-COMPA-DEVICE-MIB.mib:deviceHwStatusMemUsageTotalMem OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-DEVICE-MIB.mib:deviceHwStatusMemUsageUsedMem OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-DEVICE-MIB.mib:deviceHwStatusMemUsageFreeMem OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-DEVICE-MIB.mib:deviceCpuUsageUserCpu OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-DEVICE-MIB.mib:deviceCpuUsageSystemCpu OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-DEVICE-MIB.mib:deviceCpuUsageIdleCpu OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-UAP-MODULES-MIB.mib:chassisBatteryAlarmsLowThresholdMinorVoltage OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-UAP-MODULES-MIB.mib:chassisBatteryAlarmsLowThresholdMajorVoltage OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-UAP-MODULES-MIB.mib:chassisBatteryAlarmsHighThresholdMinorVoltage OBJECT-TYPE
/opt/assure1/ixia/EXMP-COMPA-UAP-MODULES-MIB.mib:chassisBatteryAlarmsHighThresholdMajorVoltage OBJECT-TYPE

This command filters only the MIBs and objects that contain one of the metric type strings mentioned in the command. You can add more metric types if required.

Not all objects found using this command relate to performance metrics. A few may be related to fault metrics. For example, in the above result snippet, objects of the type chassisBatteryAlarmsLowThresholdMinorVoltage are related to fault. You need to manually verify this by going through the descriptions of the objects in the MIB file.

From the above output, the objects of interest are:

Generally, performance support should be provided for as many metrics as possible. The number of metrics is limited only by the information available in the snmp walk. However, you can look out for just your specifically required performance metrics or MIB objects.

Step 2: Finding OIDs of MIB Objects

To find the OIDs of the required MIB objects, use the following command:

snmptranslate -M <path-to-MIB-files> -m ALL -On <MIB::object> 2> <path-to-error-file>

An example command and output is:

snmptranslate -M /opt/assure1/distrib/mibs -m ALL -On EXMP-COMPA-DEVICE-MIB::deviceHwStatusMemUsageTotalMem 2> /opt/assure1/error_deviceHwStatusMemUsageTotalMem.txt

.1.3.6.1.4.1.3054.100.2.3.1.8.4.1

If you cannot find the OID of a MIB object with this command, check the error file for any errors, resolve these errors, and rerun the command.

Note:

The snmptranslate command refers to all the files present inside the path given to find the OID from an object. Since there are usually a large number of MIB files, it can take a lot of time to execute. For a faster method, you can use the path to a directory having a copy of the dependency MIBs so that each translation does not have to look at the entire MIBs folder. Instead of directly copying the MIBs, symbolic links can be created. For example, if IF-MIB is needed to be in the local dependency MIBs folder, instead of copying it from the MIBs folder, a symbolic link can be created:

mkdir dependency-mibs

ln -s $A1BASEDIR/distrib/mibs/IF-MIB.txt dependency-mibs/

ls -l dependency-mibs/

This creates a link pointing to the original file.

Step 3: Looking for Patterns in Values of OIDs in SNMP Walk

Observe the OIDs of the MIB objects of interest in the example from the previous step. If you search for 100.2.3.1.8.4.1, which is the suffix of the OID .1.3.6.1.4.1.3054.100.2.3.1.8.4.1 of the deviceHwStatusMemUsageTotalMem object, in the walk, you will get a list of entries. The following is a snippet of the list of entries:

SNMPv2-SMI::enterprises.3054.100.2.3.1.8.4.1.0 = Gauge32: 8073652
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.4.2.0 = Gauge32: 567028
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.4.3.0 = Gauge32: 7506624
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.2.1 = STRING: "cpu"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.2.2 = STRING: "cpu0"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.2.3 = STRING: "cpu1"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.3.1 = STRING: "Overall CPU usage"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.3.2 = STRING: "CPU0 usage"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.3.3 = STRING: "CPU1 usage"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.4.1 = STRING: "1.6"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.4.2 = STRING: "2.0"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.4.3 = STRING: "6.3"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.5.1 = STRING: "1.2"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.5.2 = STRING: "1.8"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.5.3 = STRING: "3.5"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.6.1 = STRING: "96.9"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.6.2 = STRING: "95.8"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.6.3 = STRING: "89.8"
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.99.1 = INTEGER: 1
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.99.2 = INTEGER: 1
SNMPv2-SMI::enterprises.3054.100.2.3.1.8.5.1.99.3 = INTEGER: 1

Note:

When searching in the walk, Oracle recommends using the suffix of the OID because, in many cases, the prefix is replaced with a string value.

In the above list, you can observe the following patterns:

Step 4: Taking Information from MIB Objects and SNMP Walk to Curate PCOM

From the example described in the previous steps, you can infer that the PCOM is being curated for memory metrics and CPU metrics. This means that there will be two objects in the PCOM file, with the value of the class field for one being MEMORY, and the class field of the other being CPU. See the class field definition in Object Definitions for more information.

To find the values of the other fields in the PCOM file, you go through the original MIB file to look for the details of objects of interest.

For the fields in the object with the class field value of MEMORY, consider the following snippet from the MIB file:

-- System memory utilization (KB)
-- tagpath /device/hwStatus/memUsage
deviceHwStatusMemUsage OBJECT IDENTIFIER ::= { deviceHwStatus 4 }

-- tagpath /device/hwStatus/memUsage/totalMem
deviceHwStatusMemUsageTotalMem OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Total memory"
    ::= { deviceHwStatusMemUsage 1 }

-- tagpath /device/hwStatus/memUsage/usedMem
deviceHwStatusMemUsageUsedMem OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Used memory"
    ::= { deviceHwStatusMemUsage 2 }

-- tagpath /device/hwStatus/memUsage/freeMem
deviceHwStatusMemUsageFreeMem OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Free memory"
    ::= { deviceHwStatusMemUsage 3 }

From the snippet, you can set the values for the following fields:

For the fields in the object with the class field value of CPU, consider the following snippet from the MIB file:

-- tagpath /device/hwStatus/cpuUsage
deviceCpuUsageTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF DeviceCpuUsageEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "CPU utilization (%)"
    ::= { deviceHwStatus 5 }

-- tagpath /device/hwStatus/cpuUsage
deviceCpuUsageEntry OBJECT-TYPE
    SYNTAX      DeviceCpuUsageEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION ""
    INDEX { deviceCpuUsageIndex }
        ::= { deviceCpuUsageTable 1 }

DeviceCpuUsageEntry ::=
    SEQUENCE {
        deviceCpuUsageIndex Integer32,
        deviceCpuUsageCpuId String,
        deviceCpuUsageDescription String,
        deviceCpuUsageUserCpu ConfdString,
        deviceCpuUsageSystemCpu ConfdString,
        deviceCpuUsageIdleCpu ConfdString
    }

-- tagpath /device/hwStatus/cpuUsage/index
deviceCpuUsageIndex OBJECT-TYPE
    SYNTAX      Integer32 (1 .. 2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "Table index; although mandatory, this object is ignored during SNMP CREATE operations.The system will assign its own index which can be determined  by reading the entire table."
    ::= { deviceCpuUsageEntry 1 }

-- tagpath /device/hwStatus/cpuUsage/cpuId
deviceCpuUsageCpuId OBJECT-TYPE
    SYNTAX      String
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION ""
    ::= { deviceCpuUsageEntry 2 }

-- tagpath /device/hwStatus/cpuUsage/description
deviceCpuUsageDescription OBJECT-TYPE
    SYNTAX      String
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION ""
    ::= { deviceCpuUsageEntry 3 }

-- tagpath /device/hwStatus/cpuUsage/userCpu
deviceCpuUsageUserCpu OBJECT-TYPE
    SYNTAX      ConfdString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "User CPU utilization"
    ::= { deviceCpuUsageEntry 4 }

-- tagpath /device/hwStatus/cpuUsage/systemCpu
deviceCpuUsageSystemCpu OBJECT-TYPE
    SYNTAX      ConfdString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "System CPU utilization"
    ::= { deviceCpuUsageEntry 5 }

-- tagpath /device/hwStatus/cpuUsage/idleCpu
deviceCpuUsageIdleCpu OBJECT-TYPE
    SYNTAX      ConfdString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Idle CPU utilization"
    ::= { deviceCpuUsageEntry 6 }

The CPU objects are presented in a different manner to the memory objects, as seen above. This is because the MIB objects related to CPU metrics are a part of a table rather than individual objects.

The data in MIB files can be categorized in three formats:

To visualize the information from the CPU objects, along with the information from the SNMP walk, the data can be presented in a table as follows:

Table Object Name (with OID): deviceCpuUsageTable (.3054.100.2.3.1.8.5)

Table Entry Type Object (with OID of one instance): deviceCpuUsageEntry (.3054.100.2.3.1.8.5.1)

deviceCpuUsageIndex (.3054.100.2.3.1.8.5.1.1) deviceCpuUsageCpuId (.3054.100.2.3.1.8.5.1.2) deviceCpuUsageDescription (.3054.100.2.3.1.8.5.1.3) deviceCpuUsageUserCpu (.3054.100.2.3.1.8.5.1.4) deviceCpuUsageSystemCpu (.3054.100.2.3.1.8.5.1.5) deviceCpuUsageIdleCpu (.3054.100.2.3.1.8.5.1.6)
1 cpu (.3054.100.2.3.1.8.5.1.2.1) Overall CPU usage (.3054.100.2.3.1.8.5.1.3.1) 1.6 (.3054.100.2.3.1.8.5.1.4.1) 1.2 (.3054.100.2.3.1.8.5.1.5.1) 96.9 (.3054.100.2.3.1.8.5.1.6.1)
2 cpu0 (.3054.100.2.3.1.8.5.1.2.2) CPU0 Usage (.3054.100.2.3.1.8.5.1.3.2) 2.0 (.3054.100.2.3.1.8.5.1.4.2) 1.8 (.3054.100.2.3.1.8.5.1.5.2) 95.8 (.3054.100.2.3.1.8.5.1.6.2)
3 cpu1 (.3054.100.2.3.1.8.5.1.2.3) CPU1 Usage (.3054.100.2.3.1.8.5.1.3.3) 6.3 (.3054.100.2.3.1.8.5.1.4.3) 3.5 (.3054.100.2.3.1.8.5.1.5.3) 89.8 (.3054.100.2.3.1.8.5.1.6.3)

From the table, you can set the values for the following fields:

From the code snippet, you can set the values for the following fields:

Note:

There are some cases where different instances have different metric types or get their information from different MIB objects, but belong to the same class and subclass. In such cases, you can add these separate instances within the same object, as separate elements in the values array. You do not have to create a separate object in the PCOM for each instance.

Testing Curated PCOM

There are two ways of testing the curated PCOM:

Testing Using SOA Applications

To test the curated PCOM file using SOA applications:

  1. Identify the required devices, whether they are standard (vendor-specific) or basic (IETF), and get their IP addresses.

  2. Discover the devices by first running the Device Auto Discovery (Ping Discovery) job, and then running the Device SNMP Discovery job:

    • To discover the devices by running the Device Auto Discovery (Ping Discovery) job:

      1. In the Unified Assurance UI, go to the Jobs UI.

        From the Configuration menu, select Broker Control, then Jobs. See Jobs in Unified Assurance User's Guide for more information on this UI.

      2. Clone the Device Auto Discovery job.

      3. Modify the cloned Device Auto Discovery - Copy job by setting LogLevel to DEBUG and Status to Enabled, and click Submit.

      4. Go to the Inclusion Profiles UI.

        From the Configuration menu, select Device Discovery, then Inclusion Profiles. See Inclusion Profiles in Unified Assurance User's Guide for more information on this UI.

      5. Click Add and, from the dropdown list, click Ping Inclusion Profile.

      6. In the form that shows up, enter the required values in the Name and IP Address Regex Range fields, set the CIDR field to Disabled, and click Submit.

      7. Go back to the Jobs UI and start the Device Auto Discovery - Copy job. If the job is already in Running state, restart the service.

      8. Go to the Devices UI.

        From the Configuration menu, select Device Catalog, then Devices. See Devices in Unified Assurance User's Guide for more information on this UI.

      9. Review the devices that have been discovered.

        All initially discovered devices appear in the Devices UI with Verified state.

    • To discover the devices by running the Device SNMP Discovery job:

      1. In the Unified Assurance UI, go to the Jobs UI.

        From the Configuration menu, select Broker Control, then Jobs. See Jobs in Unified Assurance User's Guide for more information on this UI.

      2. Clone the Device SNMP Discovery job.

      3. Modify the cloned Device SNMP Discovery - Copy job by setting LogLevel to DEBUG and Status to Enabled, and click Submit.

      4. Go to the SNMP Access UI.

        From the Configuration menu, select Device Discovery, then SNMP Access. See SNMP Access in Unified Assurance User's Guide for more information on this UI.

      5. Click Add.

      6. In the form that shows up, set the values for SNMP Version, Profile Name, Priority Order, and Community String fields, and click Submit.

      7. Go back to the Jobs UI and start the Device SNMP Discovery - Copy job.

      8. Go to the Devices UI.

        From the Configuration menu, select Device Catalog, then Devices. See Devices in Unified Assurance User's Guide for more information on this UI.

      9. Review the devices that have been discovered.

        All SNMP discovered devices appear in the Devices UI with Discovered state.

  3. If you are testing using the Metric Generic SNMP Poller, generate the foundation rules from the curated PCOM file:

    1. From the command line of your testing server, install the sdk-lib package as root user, if it is not installed already:

      sudo su
      ls $A1BASEDIR/bin
      source $A1BASEDIR/.bashrc
      $A1BASEDIR/bin/Package install sdk-lib
      
    2. Switch to assure1 user:

      su assure1
      
    3. Run the PCOM2Rules tool, making sure to enter the correct paths to the PCOM file and foundation rules file as inout and output respectively. These paths must be within the assure1 directory or a sub-directory of assure1.

      $A1BASEDIR/bin/sdk/PCOM2Rules <path to PCOM file>/<filename> >> <path for .foundationrules file>/<filename>
      
    4. Navigate the path to the foundation file to view the generated output file:

      cat <path for .foundationrules file>
      
  4. Add the foundation rules file into the testing server:

    1. In the Unified Assurance UI, go to the Rules UI.

      From the Configuration menu, select Rules. See Rules in Unified Assurance User's Guide for more information on this UI.

    2. Expand the following folders:

      Core Rules (core)/Default read-write branch (default)/collection/metric/snmp/_vendor

    3. Click Add, then Add File.

    4. In the Rule (new) window, paste the foundation rules file generated using the PCOM2Rules tool, enter a name for the file in the File Name field, and click Submit.

  5. Create a poller template with the specified metric type used in the PCOM file:

    1. In the Unified Assurance UI, go to the Poller Templates UI.

      From the Configuration menu, select Metrics, then Poller Templates. See Poller Templates in Unified Assurance User's Guide for more information on this UI.

    2. Click Add.

    3. In the Poller Template (new) menu, enter a name for the template in the Name field, select the required metric types, and click Submit.

  6. Create a threshold group with the specified thresholds used in the PCOM file:

    1. In the Unified Assurance UI, go to the Threshold Groups UI.

      From the Configuration menu, select Metrics, then Thresholds, then Threshold Groups. See Threshold Groups in Unified Assurance User's Guide for more information on this UI.

    2. Click Add.

    3. In the Threshold Group (new) window, enter a name for the threshold group in the Name field, select the required thresholds, and click Submit.

  7. Create a polling assignment using the poller template and threshold group created in steps 5 and 6:

    1. In the Unified Assurance UI, go to the Polling Assignments UI.

      From the Configuration menu, select Metrics, then Polling Assignments. See Polling Assignments in Unified Assurance User's Guide for more information on this UI.

    2. In the Crud Form, enter the following details:

      • Method: SNMP

      • Poller Template: The name of the poller template created in step 5.

      • Threshold Group: The name of the threshold group created in step 6.

      • Poll Time: 300

    3. From the Devices list, select the ones that were discovered and click Submit.

  8. In the Unified Assurance UI, navigate to the Services UI.

    From the Configuration menu, select Broker Control, then Services. See Services in Unified Assurance User's Guide for more information on this UI.

  9. Select the Metric Generic SNMP Poller and click Restart.

  10. In the Unified Assurance UI, navigate to Devices. Click on the Metrics icon for the required discovered device.

    The Metrics Overview window appears.

  11. Verify the metrics that appear in the Metrics Overview window.

Testing Using Microservices

To test the curated PCOM file using microservices:

  1. Identify the required devices, whether they are standard (vendor-specific) or basic (IETF), and get their IP addresses.

  2. Discover the devices:

    1. From the command line of your testing server, as the assure1 user, set up the required environment variables and install the microservices required for discovery:

      export NAMESPACE=a1-zone1-pri
      
      export WEBFQDN=`hostname -f`
      
      a1helm install snmp-poller assure1/snmp-poller -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
      
      a1helm install discovery-service assure1/discovery-service -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
      
      a1helm install dom-processor assure1/dom-processor -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
      
      a1helm install graph-sink assure1/graph-sink -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
      
      a1helm install ping-poller assure1/ping-poller -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
      
    2. Verify that the installed microservices are running properly:

      a1k get pods -n a1-zone1-pri
      
    3. Create the JWT token for authorization:

      $A1BASEDIR/bin/JWT -a discovery-service -s assure1 
      
    4. Create a JSON file called <vendor>-discovery-payload.json, where <vendor> is the name of the vendor. For example, ixia. See Example Payload File for an example file.

    5. Send a POST request to the Create a Discovery Job endpoint, passing <vendor>-discovery-payload.json as the request body by specifying it in the -d option:

      curl -X POST -H "Authorization: Bearer <JWT_token>" -d @<vendor>-discovery-payload.json https://<collection server url>:9443/discovery-service/discovery/request/create/
      

      In the request response, look for the value of DiscoveryContextID and copy it.

    6. To check the status of the POST request, submit the following GET request:

      curl -X GET -H "Authorization: Bearer <JWT_token>" https://<collection server url>:9443/discovery-service/discovery/request/status
      

      When the value of the SNMPStatus attribute is Completed, the discovery request is done.

    7. Submit the following GET request:

      curl -X GET -H "Authorization: Bearer <JWT_token>" https://<collection server url>:9443/discovery-service/discovery/request/result/<discovery-context-id>?
      

      where <discovery-context-id> is the context ID you copied from the POST request response earlier.

    8. Send a POST request to the translate endpoint, passing the SNMP response from the previous step as the request body by specifying it in the -d option:

      curl -X POST -H "Authorization: Bearer <JWT_token>" -d @<SNMP_response> https://<collection server url>:9443/discovery-service/inventory/translate/
      
    9. To add the SNMP devices to the Unified Assurance database, send a POST request to the inventory endpoint, passing the formatted SNMP response from the previous step as the request body by specifying it in the -d option:

      curl -X POST -H "Authorization: Bearer <JWT_token>" -d @<formatted_SNMP_response> https://<collection server url>:9443/discovery-service/inventory/
      
    10. Verify that the target tables in the Unified Assurance database have been populated with the required device data:

      select * from Devices;
      select * from DeviceObjects;
      
    11. In the Unified Assurance UI, go to the Devices UI.

      From the Configuration menu, select Device Catalog, then Devices. See Devices in Unified Assurance User's Guide for more information on this UI.

    12. Verify that the target device is in Discovered state.

  3. Add the curated PCOM file into the testing server:

    1. In the Unified Assurance UI, go to the Rules UI.

      From the Configuration menu, select Rules. See Rules in Unified Assurance User's Guide for more information on this UI.

    2. Expand the following folders:

      Core Rules (core)/Default read-write branch (default)/collection/metric/snmp/_objects/pcom

    3. Click Add, then click Add File.

    4. In the Rule (new) window, paste the curated PCOM file content, give the file a name, and click Submit.

  4. From the command line of your testing server, as the assure1 user, install the Metric Sink microservice using the following command:

    export NAMESPACE=a1-zone1-pri
    export WEBFQDN=`hostname -f`
    a1helm install metric-sink assure1/metric-sink -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
    

    See Metric Sink in Unified Assurance Implementation Guide for more information on this microservice.

  5. Uninstall the SNMP Poller microservice using the following command:

    export NAMESPACE=a1-zone1-pri
    export WEBFQDN=`hostname -f`
    a1helm uninstall snmp-poller -n $NAMESPACE
    

    See SNMP Poller in Unified Assurance Implementation Guide for more information on this microservice.

  6. Reinstall the SNMP Poller microservice using the following command:

    a1helm install snmp-poller assure1/snmp-poller -n $NAMESPACE --set global.imageRegistry=$WEBFQDN --set configData.LOG_LEVEL=DEBUG
    
  7. Scale up the worker pods of the SNMP Poller microservice to get a pod for polling:

    a1k scale --replicas=2 sts snmp-poller-worker -n $NAMESPACE
    
  8. In the Unified Assurance UI, navigate to Devices. Click on the Metrics icon for the required discovered device.

    The Metrics Overview window appears.

  9. Verify the metrics that appear in the Metrics Overview window.

Example Payload File

The following is the ixia-discovery-payload.json file:

{
    "Type": "Discovery",
    "Version": "1.0.0",
    "Data": {
        "Configuration": {
            "ForcedProtocolDiscovery": false,
            "ContextExpiryTimeM": 60,
            "ICMPConfiguration": [
                {
                    "Mode": 1,
                    "TimeoutS": 1,
                    "Count": 4,
                    "CascadeMs": 10
                }
            ],
            "SNMPConfiguration": [
                {
                    "ProbeV2Support": true,
                    "NetworkOptions": {
                        "Timeout": "1s",
                        "ExpotentialTimeout": "true",
                        "Retries": 2,
                        "MaxOids": 64,
                        "MaxRepetition": 10,
                        "NonRepeaters": 0
                    },
                    "CustomSNMPAccessProfiles": [
                        {
                            "Version": 2,
                            "Priority": 0,
                            "Port": 161,
                            "MTU": 1456,
                            "Auth": {
                                "Community": "public"
                            }
                        }
                    ]
                }
            ],
            "RESTConfiguration": [],
            "SOAPConfiguration": []
        },
        "Seeds": [],
        "IPranges": [],
        "IPList": ["172.16.21.22"],
        "Level": [
            1,
            2
        ],
        "InventoryEngine": "insomnia-client"
    }
}

Analyzing the SNMP Poller Logs

To analyze the logs when testing using the Metric Generic SNMP Poller, open the log file at $A1BASEDIR/logs/MetricGenericSNMPPoller.log. This is the default location of the log file. If you have specified a different location and need to find the correct file path, do the following:

  1. In the Unified Assurance UI, go to the Services UI.

    From the Configuration menu, select Broker Control, then Services. See Services in Unified Assurance User's Guide for more information on this UI.

  2. Select the Metric Generic SNMP Poller.

  3. In the Configuration section of the Service (edit) pane that pops up, check the value of the LogFile field. This will show the path of the poller log files in the Unified Assurance directory.

  4. In the command line of the Unified Assurance server, open the $A1BASEDIR/<path_from_previous_step> file.

To analyze the logs when testing using the SNMP Poller microservice, check the logs of the polling worker using the following command:

a1k logs snmp-poller-worker-1 -n a1-zone1-pri

In the log file, check for the combination of <class_subclass_weight> for your required metric. For example, for the CPU UTILIZATION metric, you may see CPU_UTILIZATION_2, which means that CPU is the class, UTILIZATION is the subclass, and 2 is the weight. You can check these values for all types of metrics, with different classes and subclasses, to understand how the values of each metric are showing up in the UI.

Useful Resources