Performance¶
Introduction¶
As part of Assure1 v5, Federos is creating a library of devices for out-of-the-box polling support for useful metrics. PCOM is for performance metrics. Federos does not provide a MIB2PCOM application for converting a MIB to a pre-certified PCOM file. This is a manual process where you ask some technical questions and get the answers before creating a PCOM file. You start by curating a PCOM file directly, and then use the PCOM2Rules application to create the foundation rules.
Here are the questions that you need to ask before creating your PCOM.
-
What type of data is being collected?
-
What OID(s) contain the data being collected?
-
Are those OID(s) in a table?
-
What type of value: Counter vs. Gauge?
-
-
How would you test that the values are available?
-
Is there a static instance or a table of instances?
-
Is there a static maximum or a table of maximums?
-
Is there a factor to reduce units?
-
Does there need to be a filter on the values stored?
-
Are you using existing Metric Types or do new ones need to be created?
-
Is there more than one value that overrides the standard support?
The following diagram shows the overall process for creating foundation rules with a pre-certified PCOM file.
PCOM Schema Definition¶
PCOM files are device validation models. These definitions are a JSON format that defines the SNMP OIDs needed to satisfy basic polling functionality like CPU, Memory, Disk, Temp, Fan, Interfaces, etc. The work involved is essentially taking MIBs and converting them into Federos’s COM definition. So get a MIB, extract out the CPU, Memory, Disk, Temp, Fan, Interfaces values, and create a JSON file with these values using Federos’s COM schema.
Schema notes¶
Top-level information¶
-
@vendor
-
The enterprise name from the MIBs
-
If a vendor was purchased by another, keep them separate
-
-
mibs
-
List all MIBs used
-
This will also be used to test for coverage
-
-
note
-
Full name of vendor
-
Any other top-level meta information relevant to the vendor / device.
-
-
objects
-
List of PCOM objects derived from SNMP OIDs.
-
Required, even if empty.
-
Object information¶
-
@objectName
- Required and must be in MIB name-spaced textual convention
-
certification
- Will be STANDARD for all vendor work
-
class/subclass
-
All caps and are the unique keys to allow overrides from other MIBs and affected by weight
-
Examples: CPU, Disk, Temperature
-
-
metaData
-
certified
- Will always be false until curated
-
location
- Should be the rules file where a curator should look
-
-
notes
- An array of strings to mention important information about the processing
-
snmp
-
Fields containing SNMP information about the object
-
Fields that are not defined are null, including the "Device" instance
-
SNMP fields¶
-
discovery
-
Should either be the single instance of the OID, or the index OID for a table
-
Required for all objects
-
-
factor
-
The factor of a unit as defined in the source MIB
-
Thus, if the UNITS of a memory or disk metric are defined as being in kilobytes, then the factor would be set to 1024.
-
Or, as in the case of SNMPv2-MIB::sysUpTime, the unit of the metric is in hundredths of a second, so the factor is set to 0.01.
-
In the JSON example below, the value of HOST-RESOURCES-MIB::hrStorageAllocationUnits (defined as “the size, in bytes, of the data objects allocated from this pool”) is used to provide the factor.
-
-
filter
-
Filters out instances of metrics which are invalid, not set, of the wrong type, etc.
-
Takes a comparison operator, a property (name & OID) and a value.
-
In the JSON example below, the HOST-RESOURCES-MIB::hrStorageType is used to filter on an OID values (in this case the OID for hrStorageFixedDisk).
-
-
instance
-
The specific instance of the component for which the metric has been gathered.
-
In the JSON example below, the HOST-RESOURCES-MIB::hrStorageDescr object is used to provide this information.
-
-
maximum
-
Denotes the maximum possible value of a metric.
-
For instance, a metric which is defined as being a percentage value would have the maximum set to “100”.
-
In the JSON example below, the HOST-RESOURCES-MIB::hrStorageSize object is used to provide this information.
-
-
values
-
Should have both the name (in MIB name-spaced textual convention) and OID from the MIB
-
metricType
- Required if storing the value directly
-
valueType
- Should be one of Gauge32, Counter32, Counter64
-
-
weight
-
Basic will always be 1 and Standard should start at 2
-
If a vendor (e.g. Cisco), has multiple MIBs to get the same information, all should be added with increasing weights
-
The highest weight wins
-
Put the oldest or deprecated lower
-
Review the MIB-2-PCOM.json::HOST-RESOURCES-MIB::hrStorageTable and ucdavis-PCOM.json::UCD-SNMP-MIB::dskTable
-
They both use class: DISK and subClass: USAGE, but the ucdavis one has a higher weight
-
The ucdavis one has to be manually configured in snmpd.conf, but if done so, it will trump the configuration from host resources
-
-
eval
-
Allows a synthetic metric to be derived from the data provided by the SNMP MIB.
-
In the JSON example below, HOST-RESOURCES-MIB::hrStorageSize and HOST-RESOURCES-MIB::hrStorageUsed are used to determine the amount of free disk space on a drive for the value of the metricType “Disk Free”.
-
Filename¶
- Name of the MIB with -PCOM.json, for example,
-PCOM.json
Example¶
This is an example of the HP-MEMPROC MIB. The following values can provide some useful Metrics (CPU, Memory, Disk, Temp, Fan, Interfaces, etc).
-
hpmpCPU (1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1) includes:
- hpmpCPUIndex
- hpmpCPULoad1min
- hpmpCPULoad5min
- hpmpCPULoad15min
- hpmpCPUPctBusy
-
hpmpMemory (1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.2) includes:
- hpmpMemIndex
- hpmpMemDescr
- hpmpMemInUse
- hpmpMemTotal
- hpmpMemPctInUse
Create a file called HP-MEMPROC-PCOM.json and put these values in using Federos’s COM schema:
{
"@vendor" : "hp",
"mibs" : [
"HP-MEMPROC-MIB"
],
"notes" : "Hewlett Packard",
"enterpriseOids" : [
"1.3.6.1.4.1.11"
],
"aliases" : [],
"objects" : [
{
"@objectName" : "HP-MEMPROC-MIB::hpmpCPUPctBusy",
"certification" : "STANDARD",
"class" : "CPU",
"description" : "Information relating to CPU Utilization.",
"domain" : "PERFORMANCE",
"metaData" : {
"certified" : false
},
"method" : "snmp",
"notes" : [
],
"snmp" : {
"discovery" : {
"name" : "HP-MEMPROC-MIB::hpmpCPUIndex",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1.1.1.1"
},
"factor" : null,
"filter" : null,
"instance" : "CPU$i",
"maximum" : null,
"values" : [
{
"metricType" : "CPU Utilization",
"name" : "HP-MEMPROC-MIB::hpmpCPUPctBusy",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1.1.1.5",
"valueType" : "Gauge32",
"thresholds" : [
"High CPU Minor",
"High CPU Major"
]
}
]
},
"subClass" : "UTILIZATION",
"weight" : 2
},
{
"@objectName" : "HP-MEMPROC-MIB::hpmpCPUEntry",
"certification" : "STANDARD",
"class" : "CPU",
"description" : "An index that uniquely represents a CPU on this device. This index is assigned arbitrarily by the engine and is not saved over reboots.",
"domain" : "PERFORMANCE",
"metaData" : {
"certified" : false
},
"method" : "snmp",
"notes" : [
],
"snmp" : {
"discovery" : {
"name" : "HP-MEMPROC-MIB::hpmpCPUIndex",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1.1.1.1"
},
"factor" : null,
"filter" : null,
"instance" : null,
"maximum" : null,
"values" : [
{
"instance" : "1 Minute Average CPU$i",
"metricType" : "CPU Load Average",
"name" : "HP-MEMPROC-MIB::hpmpCPULoad1min",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1.1.1.2",
"valueType" : "Integer32"
},
{
"instance" : "5 Minute Average CPU$i",
"metricType" : "CPU Load Average",
"name" : "HP-MEMPROC-MIB::hpmpCPULoad5min",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1.1.1.3",
"valueType" : "Integer32"
},
{
"instance" : "15 Minute Average CPU$i",
"metricType" : "CPU Load Average",
"name" : "HP-MEMPROC-MIB::hpmpCPULoad15min",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.1.1.1.4",
"valueType" : "Integer32"
}
]
},
"subClass" : "LOAD",
"weight" : 2
},
{
"@objectName" : "HP-MEMPROC-MIB::hpmpMemEntry",
"certification" : "STANDARD",
"class" : "MEMORY",
"description" : "An index that uniquely represents a Memory pool on this device. This index is assigned arbitrarily by the engine and is not saved over reboots.",
"domain" : "PERFORMANCE",
"metaData" : {
"certified" : false
},
"method" : "snmp",
"notes" : [
],
"snmp" : {
"discovery" : {
"name" : "HP-MEMPROC-MIB::hpmpMemIndex",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.2.1.1.1"
},
"factor" : 1024,
"filter" : null,
"instance" : {
"name" : "HP-MEMPROC-MIB::hpmpMemDescr",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.2.1.1.2"
},
"maximum" :
{
"name" : "HP-MEMPROC-MIB::hpmpMemTotal",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.2.1.1.4"
},
"values" : [
{
"metricType" : "Memory Used",
"name" : "HP-MEMPROC-MIB::hpmpMemInUse",
"oid" : "1.3.6.1.4.1.11.2.3.7.11.17.7.1.5.1.2.1.1.3",
"valueType" : "Gauge32",
"thresholds" : [
"High Mem Major"
]
},
{
"metricType" : "Memory Free",
"eval" : "$hpmpMemTotal[$i] - $hpmpMemInUse[$i]"
}
]
},
"subClass" : "USAGE",
"weight" : 2
}
]
}
SNMP Walks of New Devices¶
Federos would appreciate SNMP walks from SNMP-capable devices to help build out our device walk library. These can be generated using the standard walk command:
snmpwalk -v <SNMP Version> -c <community> -ObentU <IPAddress> 1.3.6 > vendor.model.snmpwalk
For example: (fake device)
snmpwalk -v 2c -c public -ObentU <IPADDRESS> 1.3.6 > Cisco.2900.snmpwalk
Useful resources¶
-
SNMP Laboratories MIB repository
-
Pretty comprehensive online MIB repository that seems quite up-to-date.
-
-
UIM SNMP Data Monitoring Device Support
-
Online repository of supported vendors, devices, metrics, MIBs and utilities for the Assure1 product.
-
-
Circitor MIB files repository
-
Good MIB repository which provides a handy break-down of the objects in a MIB and displays both the symbolic name and the full OID of the object.
-
-
Desktop Free Mib Browser