Chapter 12. Monitoring systems 187
12.5 Using the OSA-Express SNMP subagent
The OSA-Express Simple Network Management Protocol (SNMP) subagent (osasnmpd)
supports Management Information Bases (MIBs) for OSA-Express features in QDIO mode
only. You can use traditional snmp commands to obtain MIB information from the new Direct
SNMP MIB, also called the
OSA-Express Enterprise Specific MIB. The MIBS.DATA file
provides the mapping of the names of the OSA tables and objects to their SNMP object
identifiers (OIDs). The query function is supported using the SNMP “get” command, and is
used to obtain real time device specifying information, such as operational status and traffic
counts.
12.5.1 Obtaining and configuring osasnmpd
This section outlines the steps to obtain and configure the OSA-Express SNMP subagent. Be
aware that this sample configuration does not take security-related requirements into
account. For details, consult Device Drivers, Features, and Commands for the April 2004
stream at:
http://www-128.ibm.com/developerworks/linux/linux390/april2004_documentation.html
Information on net-snmp can be found at:
http://net-snmp.sourceforge.net/
Download the IBM OSA-Express MIB
The OSA-Express SNMP subagent requires you to download the IBM OSA-Express MIB.
This MIB file is valid only for the OSA-Express adapter, and you can obtain it from IBM
Resource Link™:
1. Sign in IBM Resource Link at:
http://ibm.com/servers/resourcelink/
A user ID and password are required. You can apply for a user ID if you do not yet have
one, or use an existing user ID.
2. Select Library from the left-hand navigation area.
3. Under Library shortcuts, select Open Systems Adapter (OSA) Library.
4. Follow the link for OSA-Express Direct SNMP MIB module.
5. Select and download the MIB for your Licensed Internal Code (LIC) level. This example
uses the osa10gig.mib.
6. Rename the MIB file to the name specified in the MIBs definition line. In this example, the
definition line in the MIB is:
==>IBM-OSA-MIB DEFINITIONS ::= BEGIN
Then, this example renames the MIB to IBM-OSA-MIB.txt.
7. Place the MIB file in /usr/share/snmp/mibs directory and change file permission to 644.
Note: An SNMP management application, such as Tivoli NetView®, can use an SNMP for
OSA-Express. This feature is currently
not supported for OSA-Express adapters
connected to a z/VM Virtual Switch (VSWITCH).
Note: If you use a different directory, be sure to specify the changed directory in the
snmp.conf file.
188 IBM z/VM and Linux on IBM System z: Virtualization Cookbook for Red Hat Enterprise Linux 4
Configure osasnmpd on Red Hat Enterprise Linux 4
Configure the OSA-Express SNMP subagent. Ensure the s390-tools and net-snmp-libs
packages are installed. Then, perform the following steps:
1. Install net-snmp Red Hat Package Manager (RPM) and net-snmp-utils RPM as
Example 12-27 shows.
Example 12-27 Installing net-snmp and net-snmp-utils
#rpm-ivh net-snmp-5.1.2-11.EL4.6.s390x.rpm
net-snmp-utils-5.1.2-11.EL4.6.s390x.rpm
warning: net-snmp-5.1.2-11.EL4.6.s390x.rpm:V3 DSA signature:NOKEY, key ID
db42a60e
Preparing... ########################################### [100%]
1:net-snmp ########################################### [ 50%]
2:net-snmp-utils ########################################### [100%]
2. Tailor the /etc/snmp/snmpd.conf file:
In the security name section, add a line that maps a community name to a security
name:
# First, map the community name "public" into a "security name"
# sec.name source community
#com2sec notConfigUser default public
com2sec pubsec localhost public
This example maps the security name “pubsec” to the “public” community on the local
host machine.
In the group section, add a group for each master agent version as Example 12-28
shows. This example maps the “pubsec” security name to the group named
“osagroup”. This is done for both the “v1” and “v2c” security models.
Example 12-28 Adding a group for each master agent
# Second, map the security name into a group name:
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group osagroup v1 pubsec
group osagroup v2c pubsec
In the view section, add a line to define access rights to a subset of OIDs as
Example 12-29 shows. This example defines the “allview” view with access rights to
the “.1” OID subtree.
Example 12-29 Defining access rights
# Third, create a view for us to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view allview included .1
This example assigns the “allview” access rights to the group “osagroup”. In the access
section, assign access rights to the group:
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif

Get IBM z/VM and Linux on IBM System z: Virtualization Cookbook for Red Hat Enterprise Linux 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.