10.22. Monitoring System Objects via SNMP

You can monitor Virtuozzo Hybrid Server objects via the Simple Network Management Protocol (SNMP). The implementation conforms to the same Structure of Management Information (SMI) rules as the data in the standard SNMP context: all objects are organized in a tree; each object identifier (OID) is a series of integers corresponding to tree nodes and separated by dots.

General information:

  • The OID of the root subtree with all the objects you can monitor is 1.3.6.1.4.1.26171.1.1.

  • The VIRTUOZZO-RMOND-SMI.txt information base file is required to monitor the objects. Its default location is /usr/share/snmp/mibs.

The following subsections describe ways to enable and use SNMP to monitor cluster objects.

10.22.1. Enabling SNMP Access

To enable SNMP access on a hardware node, do the following:

  1. Install the rmond package.

    # yum install rmond
    
  2. If you have a Virtuozzo Storage cluster, add the following lines to the /etc/snmp/snmpd.local.conf file:

    rwcommunity pdrs 127.0.0.1 .1.3.6.1.4.1.26171
    rwcommunity pdrs <IP_network/subnet_mask> .1.3.6.1.4.1.26171
    

    Where <IP_network> is the Virtuozzo Storage cluster network and <subnet_mask> covers all the nodes participating in the cluster.

  3. Make sure the snmpd service is running.

10.22.2. Accessing System Objects via SNMP

You can access Virtuozzo Hybrid Server objects with SNMP tools of your choice, e.g., the free Net-SNMP suite for Linux. For example, to display information on the node, do as follows:

  1. Install the net-snmp-utils package:

    # yum install net-snmp-utils
    
  2. Run the following snmpwalk command:

    # snmpwalk -m /usr/share/snmp/mibs/VIRTUOZZO-RMOND-SMI.txt -c public -v2c 127.0.0.1 .1.3.6.1.4.1.26171.1.1
    

Typical output may be the following:

VIRTUOZZO-RMOND-SMI::rmondVeId."{b5f09b02-7358-4998-860c-c622653859f3}" = STRING: \
{b5f09b02-7358-4998-860c-c622653859f3}
VIRTUOZZO-RMOND-SMI::rmondVeName."{b5f09b02-7358-4998-860c-c622653859f3}" = STRING: centos
VIRTUOZZO-RMOND-SMI::rmondVeState."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: \
running(805306372)
VIRTUOZZO-RMOND-SMI::rmondVePerfectNode."{b5f09b02-7358-4998-860c-c622653859f3}" = STRING:
VIRTUOZZO-RMOND-SMI::rmondVeMemoryTotal."{b5f09b02-7358-4998-860c-c622653859f3}" = Counter64: \
2147483648
VIRTUOZZO-RMOND-SMI::rmondVeMemoryUsage."{b5f09b02-7358-4998-860c-c622653859f3}" = Counter64: \
1788
VIRTUOZZO-RMOND-SMI::rmondVeSwapTotal."{b5f09b02-7358-4998-860c-c622653859f3}" = Counter64: 0
VIRTUOZZO-RMOND-SMI::rmondVeSwapUsage."{b5f09b02-7358-4998-860c-c622653859f3}" = Counter64: 0
VIRTUOZZO-RMOND-SMI::rmondVeCpuNumber."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: 2
VIRTUOZZO-RMOND-SMI::rmondVeCpuLimit."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: 0
VIRTUOZZO-RMOND-SMI::rmondVeCpuUnits."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: 0
VIRTUOZZO-RMOND-SMI::rmondVeCpuSystem."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: 0
VIRTUOZZO-RMOND-SMI::rmondVeCpuUser."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: 0
VIRTUOZZO-RMOND-SMI::rmondVeType."{b5f09b02-7358-4998-860c-c622653859f3}" = INTEGER: vm(0)
VIRTUOZZO-RMOND-SMI::rmondVeUuid."{b5f09b02-7358-4998-860c-c622653859f3}" = STRING: \
{b5f09b02-7358-4998-860c-c622653859f3}
VIRTUOZZO-RMOND-SMI::rmondVeDiskName."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = STRING: /vz/vmprivate/b5f09b02-7358-4998-860c-c622653859f3/harddisk.hdd
VIRTUOZZO-RMOND-SMI::rmondVeDiskTotal."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = Counter64: 0
VIRTUOZZO-RMOND-SMI::rmondVeDiskUsage."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = Counter64: 0
VIRTUOZZO-RMOND-SMI::rmondVeDiskReadRequests."{b5f09b02-7358-4998-860c-c622653859f3}".\
2881840264.645796544 = Counter64: 2
VIRTUOZZO-RMOND-SMI::rmondVeDiskWriteRequests."{b5f09b02-7358-4998-860c-c622653859f3}".\
2881840264.645796544 = Counter64: 16714
VIRTUOZZO-RMOND-SMI::rmondVeDiskReadBytes."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = Counter64: 77824
VIRTUOZZO-RMOND-SMI::rmondVeDiskWriteBytes."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = Counter64: 1073883648
VIRTUOZZO-RMOND-SMI::rmondVeDiskHash1."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = Counter32: 2881840264
VIRTUOZZO-RMOND-SMI::rmondVeDiskHash2."{b5f09b02-7358-4998-860c-c622653859f3}".2881840264.\
645796544 = Counter32: 645796544
VIRTUOZZO-RMOND-SMI::rmondVeNetworkInterface."{b5f09b02-7358-4998-860c-c622653859f3}"."" = STRING:
VIRTUOZZO-RMOND-SMI::rmondVeNetworkInBytes."{b5f09b02-7358-4998-860c-c622653859f3}"."" = \
Counter64: 6743089
VIRTUOZZO-RMOND-SMI::rmondVeNetworkOutBytes."{b5f09b02-7358-4998-860c-c622653859f3}"."" = \
Counter64: 12472
VIRTUOZZO-RMOND-SMI::rmondVeNetworkInPackets."{b5f09b02-7358-4998-860c-c622653859f3}"."" = \
Counter64: 33658
VIRTUOZZO-RMOND-SMI::rmondVeNetworkOutPackets."{b5f09b02-7358-4998-860c-c622653859f3}"."" = \
Counter64: 159
VIRTUOZZO-RMOND-SMI::rmondVeNetworkMacAddress."{b5f09b02-7358-4998-860c-c622653859f3}"."" = \
STRING: 001C42C329B0
VIRTUOZZO-RMOND-SMI::rmondVeVCpuOrdinal."{b5f09b02-7358-4998-860c-c622653859f3}".0 = INTEGER: 0
VIRTUOZZO-RMOND-SMI::rmondVeVCpuOrdinal."{b5f09b02-7358-4998-860c-c622653859f3}".1 = INTEGER: 1
VIRTUOZZO-RMOND-SMI::rmondVeVCpuTime."{b5f09b02-7358-4998-860c-c622653859f3}".0 = Counter64: \
59720000000
VIRTUOZZO-RMOND-SMI::rmondVeVCpuTime."{b5f09b02-7358-4998-860c-c622653859f3}".1 = Counter64: \
26720000000
VIRTUOZZO-RMOND-SMI::rmondLocalVeNumber.0 = INTEGER: 1
VIRTUOZZO-RMOND-SMI::rmondVeLimit.0 = INTEGER: 65535
VIRTUOZZO-RMOND-SMI::rmondLicenseVeNumber.0 = INTEGER: 65535
VIRTUOZZO-RMOND-SMI::rmondLicenseCtNumber.0 = INTEGER: 65535
VIRTUOZZO-RMOND-SMI::rmondLicenseVmNumber.0 = INTEGER: 65535
VIRTUOZZO-RMOND-SMI::rmondLicenseCtUsage.0 = INTEGER: 1
VIRTUOZZO-RMOND-SMI::rmondLicenseVmUsage.0 = INTEGER: 0
VIRTUOZZO-RMOND-SMI::rmondLicenseVmUsage.0 = No more variables left in this MIB View (It is past \
the end of the MIB tree)

10.22.3. Description of System Objects

The tables below describe objects you can monitor:

Table 10.22.3.1 Objects related to virtual environments

Object

Description

VIRTUOZZO-RMOND-SMI::rmondVeId

Virtual environment ID.

VIRTUOZZO-RMOND-SMI::rmondVeName

Virtual environment name.

VIRTUOZZO-RMOND-SMI::rmondVeState

Virtual environment state.

rVIRTUOZZO-RMOND-SMI::mondVePerfectNode

The perfect node for the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeMemoryTotal

Total memory set for the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeMemoryUsage

Memory usage inside the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeSwapTotal

Total swap space set for the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeSwapUsage

Swap space usage inside the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeCpuNumber

Number of logical CPU cores set for the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeCpuLimit

CPU limit set for the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeCpuUnits

CPU units allocated to the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeCpuSystem

CPU usage of the system processes inside the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeCpuUser

CPU usage of the user processes inside the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeType

Virtual environment type.

VIRTUOZZO-RMOND-SMI::rmondVeUuid

Virtual environment UUID reported by the dispatcher.

Table 10.22.3.2 Objects related to VM disks

Object

Description

VIRTUOZZO-RMOND-SMI::rmondVeDiskName

Full path to the VM hard disk.

VIRTUOZZO-RMOND-SMI::rmondVeDiskTotal

Total space of the VM disk.

VIRTUOZZO-RMOND-SMI::rmondVeDiskUsage

Used space of the VM disk.

VIRTUOZZO-RMOND-SMI::rmondVeDiskReadRequests

Read requests rate of the VM disk.

VIRTUOZZO-RMOND-SMI::rmondVeDiskWriteRequests

Write requests rate of the VM disk.

VIRTUOZZO-RMOND-SMI::rmondVeDiskReadBytes

Read rate of the VM disk, in bytes.

VIRTUOZZO-RMOND-SMI::rmondVeDiskWriteBytes

Write rate of the VM disk, in bytes.

VIRTUOZZO-RMOND-SMI::rmondVeDiskHash1

Low-order 32 bits of the VM disk hash.

VIRTUOZZO-RMOND-SMI::rmondVeDiskHash2

High-order 32 bits of the VM disk hash.

Table 10.22.3.3 Objects related to VE network interfaces

Object

Description

VIRTUOZZO-RMOND-SMI::rmondVeNetworkInterface

Network interface name of the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeNetworkInBytes

Incoming traffic, in bytes, received through the VE network interface.

VIRTUOZZO-RMOND-SMI::rmondVeNetworkOutBytes

Outgoing traffic, in bytes, sent through the VE network interface.

VIRTUOZZO-RMOND-SMI::rmondVeNetworkInPackets

Incoming traffic, in packets, received through the VE network interface.

VIRTUOZZO-RMOND-SMI::rmondVeNetworkOutPackets

Outgoing traffic, in packets, sent through the VE network interface.

VIRTUOZZO-RMOND-SMI::rmondVeNetworkMacAddress

MAC address of the VE network interface.

Table 10.22.3.4 Objects related to attributes

Object

Description

VIRTUOZZO-RMOND-SMI::rmondVeVCpuOrdinal

Virtual CPU ordinal numbers inside the virtual environment.

VIRTUOZZO-RMOND-SMI::rmondVeVCpuTime

Virtual CPU execution time inside the virtual environment, in nanoseconds.

VIRTUOZZO-RMOND-SMI::rmondLocalVeNumber

Number of virtual environments on the host.

VIRTUOZZO-RMOND-SMI::rmondVeLimit

Allowed number of virtual environments on the host defined by the user.

VIRTUOZZO-RMOND-SMI::rmondLicenseVeNumber

Allowed number of virtual environments on the host defined by the license.

VIRTUOZZO-RMOND-SMI::rmondLicenseCtNumber

Allowed number of containers on the host defined by the license.

VIRTUOZZO-RMOND-SMI::rmondLicenseVmNumber

Allowed number of virtual machines on the host defined by the license.

VIRTUOZZO-RMOND-SMI::rmondLicenseCtUsage

Allowed usage of containers defined by the license.

VIRTUOZZO-RMOND-SMI::rmondLicenseVmUsage

Allowed usage of virtual machines defined by the license.