1.10 About the SNMP Plugin for Ksplice

1.10.1 Installing and Configuring the SNMP Plugin
1.10.2 Testing the SNMP Plugin
1.10.3 Using Ksplice with Oracle Enterprise Manager

The SNMP plugin for Ksplice lets you use Oracle Enterprise Manager to monitor the status of Ksplice on your systems, and it also works with any monitoring solution that is compatible with SNMP.

1.10.1 Installing and Configuring the SNMP Plugin

The following prerequisites apply to the system that you want to monitor:

  • The net-snmp package must be installed.

  • The net-snmp-utils package must be installed if you want to be able to test the configuration using the snmpwalk command.

  • The snmpd service must be configured to start automatically.

  • SELinux must either be disabled or be configured in permissive mode on the system.

To install and configure the SNMP plugin on a system that you want to monitor using SNMP:

  1. Subscribe the system to the appropriate Ksplice channel for the installed Oracle Linux distribution and system architecture (for example, ol6_x86_64_ksplice for Oracle Linux 6 on x86-64).

  2. As root, use yum to install the ksplice-snmp-plugin package on the system:

    # yum install ksplice-snmp-plugin
  3. If you want to be able to test the configuration using the snmpwalk command , install the net-snmp-utils package:

    # yum install net-snmp-utils
  4. Configure the system to use the SNMP plugin by editing the /etc/snmp/snmpd.conf file.

    The following sample entries are taken from a copy of this file on an Oracle Linux 6 system:

    # Setting up permissions
    # ======================
    com2sec local localhost public
    com2sec mynet source public
    
    group local v1 local
    group local v2c local
    group local usm local
    group mynet v1  mynet
    group mynet v2c mynet
    group mynet usm mynet
    
    view all included .1 80
    
    access mynet "" any noauth exact all none none
    access local "" any noauth exact all all none
    
    syslocation Oracle Linux 6
    syscontact sysadmin <root@localhost>
    
    # Load the plugin
    # ===============
    dlmod kspliceUptrack /usr/lib/ksplice-snmp/kspliceUptrack.so
    1. In the com2sec mynet community entry, replace source with the IP address or resolvable host name of the server that hosts the SNMP monitoring software, or with a subnet address represented as IP_address/netmask (for example, com2sec mynet 192.168.10.0/24 private).

      For IPv6 configuration, specify an IPv6 address and netmask to a com2sec6 mynet community entry (for example, com2sec6 mynet fec0::/64 private).

    2. In the syslocation entry, replace the argument for the identifier of the system being monitored.

    3. In the dlmod entry that loads the kspliceUptrack.so plugin, replace the lib path element with lib on a 32-bit system and lib64 on a 64-bit system.

    This sample configuration file is suitable for the purposes of testing.

  5. Restart the SNMP service:

    # service snmpd restart

For information about configuring SNMP, see the documentation at http://www.net-snmp.org/docs/readmefiles.html and the snmpd(8) and snmpd.conf(5) manual pages.

1.10.2 Testing the SNMP Plugin

You can use the snmpwalk command to test the SNMP plugin.

To display the installed version of Ksplice:

$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceVersion
KSPLICE-UPTRACK-MIB::kspliceVersion.0 = STRING: 1.2.12

To check if all of the available updates for a kernel have been installed:

$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceStatus
KSPLICE-UPTRACK-MIB::kspliceStatus.0 = STRING: outofdate

In this example, the kernel is shown as being out of date with regard to updates.

To display and compare the kernel installed on disk with the Ksplice effective version:

$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceBaseKernel
KSPLICE-UPTRACK-MIB::kspliceBaseKernel.0 = STRING: 2.6.18-274.3.1.el5
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceEffectiveKernel
KSPLICE-UPTRACK-MIB::kspliceEffectiveKernel.0 = STRING: 2.6.18-274.3.1.el5

The base kernel version and effective kernel version are shown as being the same, which implies that no updates have been applied.

To display a list of all updates that have been applied to the kernel:

$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::ksplicePatchTable

In this example, no updates have been applied. This confirms why the base kernel version and effective kernel version are the same, and why the kernel is out of date.

To display a list of updates that can be installed:

$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceAvailTable
KSPLICE-UPTRACK-MIB::kspliceavailIndex.0 = INTEGER: 0
KSPLICE-UPTRACK-MIB::kspliceavailIndex.1 = INTEGER: 1
KSPLICE-UPTRACK-MIB::kspliceavailIndex.2 = INTEGER: 2
...
KSPLICE-UPTRACK-MIB::kspliceavailDesc.23 = STRING: CVE-2011-4325: Denial of service in NFS direct-io.
KSPLICE-UPTRACK-MIB::kspliceavailDesc.24 = STRING: CVE-2011-4348: Socking locking race in SCTP.
KSPLICE-UPTRACK-MIB::kspliceavailDesc.25 = STRING: CVE-2011-1020, CVE-2011-3637: Information leak, DoS in /proc.

After running uptrack-upgrade -y to fully upgrade your kernel using Ksplice Uptrack, the following snmpwalk commands show that the kernel is up to date, there are no updates available for installation, and the patches that have been applied:

$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceStatus
KSPLICE-UPTRACK-MIB::kspliceStatus.0 = STRING: uptodate
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceAvailTable
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::ksplicePatchTable
KSPLICE-UPTRACK-MIB::ksplicepatchIndex.0 = INTEGER: 0
KSPLICE-UPTRACK-MIB::ksplicepatchIndex.1 = INTEGER: 1
KSPLICE-UPTRACK-MIB::ksplicepatchIndex.2 = INTEGER: 2
...

1.10.3 Using Ksplice with Oracle Enterprise Manager

After installing and testing the SNMP plugin for Ksplice on a system, you can configure Oracle Enterprise Manager to query the status of Ksplice.

For more information, see Introducing Enterprise Manager Support for SNMP and Using Metric Extensions.