Portal
Language
 
Information
Article ID67
Created On4/23/2010
Modified9/2/2010
Share With Others
Setting Up SNMP
Setting Up SNMP



Setting Up SNMP. 36

SNMP Master Agent 36

Installing the SNMP Master Agent 36

Configuring the Master Agent 37

Running the Master Agent 37

Running and Configuring the Fusion-io SNMP Subagent 37

Subagent Log File. 38

Using the SNMP Sample Config Files. 38

Enabling SNMP Test Mode. 39

SNMP MIB Support 42


Setting Up SNMP

_____________________________________________________________________________

The fio-snmp-agentx SNMP agent is an RFC 2741-compliant AgentX sub-agent. (Optionally, you can use any RFC-compliant SNMP agent.) The master SNMP agent defers queries to fio-snmp-agentx for supported MIBs.

SNMP Master Agent

The fio-snmp-agentx, provided in the iodrive-snmp package, requires an already-installed SNMP master agent. The SNMP master agent must support and be configured for AgentX connections (see http://www.irtf.org/rfc/rfc2741.txt). The fio-snmp-agentx is tested and verified with Net-SNMP, which is the typical SNMP agent provided with most Linux distributions.

There are many agents available that support this functionality. If you choose to use Net-SNMP, then use the instructions in the following sections to configure and launch it.

Installing the SNMP Master Agent

Install the net-snmp package using the package manager for your version of Linux.

Red Hat

Use the following command to install Net-SNMP on Red Hat:

yum install net-snmp

Other Linux Versions

Use the standard system package manager to install the Net-SNMP package on your Linux distribution.

Configuring the SNMP Master Agent

Configure the Net-SNMP master agent daemon to set the network communications parameters, security, and other options using the snmpd.conf text file. The location of this file is system-dependent; often it is in /etc/snmp or /usr/share/snmp.

A simple snmpd configuration file might include the following:

# set standard SNMP variables

syslocation “Data room, third rack”

syscontact itguy@example.com

# required to enable the AgentX protocol

master agentx

agentxsocket tcp:localhost:705

# set the port that the agent listens on (defaults to 161)

agentaddress 161

# simple access control (some form of access control is required)

rocommunity public

Running the SNMP Master Agent

Once you install and configure the master agent, you must start or restart the snmpd daemon for the new parameters to take effect. You can simply run snmpd from its installed location (often /usr/sbin – see the snmpd man page for options). It typically needs root privileges to run properly. You can also use the snmpd startup script in /etc/init.d or /etc/rc.d/init.d. If you are concerned about security, use the more advanced SNMPv3 access control instead of the rocommunity and rwcommunity access control directives as outlined in the relevant man page.

Fusion-io SNMP AgentX Subagent

Installing the Fusion-io SNMP Subagent

1. Download the Fusion-io SNMP packages from http://support.fusionio.com.

2. Install the package using your operating systems package manager. For instance, on Red Hat, run:

rpm -Uvh iodrive-snmp-*.rpm

The ioDrive SNMP package places its MIB files in /usr/share/fusionio.

Running and Configuring the Fusion-io SNMP Subagent

1. Configure the subagent by creating a fio-snmp-agentx.conf file.

2. Store this conf file in the directory where the snmpd.conf file is located for the master agent.

3. At a minimum, set the agent network parameters in this file similar to the following:

# required to enable the AgentX protocol
agentxsocket tcp:localhost:705

This must match the AgentX network parameters in the snmpd.conf file for the master agent. For further AgentX configuration information, consult the man pages or visit http://www.net-snmp.org.

The iodrive-snmp-agentx startup script will launch automatically at boot time once the installation and configuration is complete.

Manually Running the Fusion-io SNMP Subagent

If you need to run the Fusion-io SNMP Subagent manually, follow these steps:

1. After the SNMP master agent is started, start the subagent by running this command:

/usr/bin/fio-snmp-agentx

This command launches the ioDrive subagent using the Net-SNMP configuration file named fio-snmpagentx.conf. This file must reside in one of the Net-SNMP configuration directories: /etc/snmp, /usr/share/snmp, /usr/lib/snmp, or $HOME/.snmp. (These paths can be changed; consult the man page for snmp_config.)

2. You can now view the ioDrive management information using an SNMP MIB browser or by using a network management system accessing FIOioDrv.mib (in /usr/share/fio/mib).

Subagent Log File

The ioDrive SNMP subagent can maintain a log file regarding its own activities. This file is separate from the MIB as it includes entries on the subagent’s communications with the master agent including any errors or intermittent issues.

To have the subagent maintain this log file, include the –l parameter and a path to the log file as part of the command in running the subagent. For example, the command:

fio-snmp-agentx –l /var/log/subagent.log

would keep the subagent log file in the subagent.log file in the /var/log directory . The ioDrive SNMP subagent is now ready to monitor your device.

Using the SNMP Sample Config Files

When you install SNMP, the following sample config files are available:

· /usr/share/doc/iodrive-snmp/conf/snmpd.conf/ (master agent)

· /usr/share/doc/iodrive-snmp/conf/fio-snmp-agentx.conf/ (sub-agent)

To customize and use the sample config files,

1. Rename your snmpd.conf file (such as to snmpd-orig.conf) and your fio-snmp-agentx.conf file (such as to fio-snmp-agentx-orig.conf). These files usually reside in /etc/snmp or /usr/share/snmp.

2. In the /usr/share/doc/iodrive-snmp/conf/ directory, copy the sample snmpd.conf file and a sample fio-snmp-agentx.conf file to your target SNMP directory.

3. Edit the sample files you copied and save your changes as snmpd.conf and fio-snmp-agentx.conf.

Enabling SNMP Test Mode

When the Fusion-io SNMP subagent runs, it reads the fio-snmp-agentx config file:

###################################################################

# Example config file for fio-snmp-agentx SNMP AgentX subagent.

#

# Fusion-io, Inc. #

agentxsocket tcp:localhost:705

# test_mode_enabled

# set to 1, true or yes to enable 0, false or no to disable (default: false) test_mode_enabled true

# traps_enabled

traps_enabled true

# testmode_file

# name of test mode file (default: testmode.ini)

testmode_file testmode.ini

# update_delay

# delay between agent polling requests in milliseconds (default: 250)

update_delay 100

# mib_select

# set to fio for FUSIONIO-IODRV-MIB or cpq for CPQIODRV-MIB (default: fio)

mib_select fio

###################################################################

Conditions for test mode are described below.

1. If the Admin has set the test_mode_enabled parameter from TRUE to FALSE, the Fusion-io SNMP subagent does not try to run test mode. Instead, it continues processing data as usual from the ioDrive driver, storing the data in the MIB.

2. If the CONF file says that test_mode_enabled is TRUE, the SNMP subagent reads the testmode_file line to locate the testmode.ini file. It then reads this file.

3. If the testmode.ini file shows the test mode is set to ON, then it engages the test mode.

4. If test mode is ON, the SNMP subagent reads the the next line, TestModeIndex, to identify which ioDrive or ioDrive to test. The number in this parameter is the PCIe device number shown using fio-status such as:

PCI:01:00.0

The first two numerals identify the PCIe bus number (in this case, 01). This bus number is reported in hexadecimal, whereas the TestModeIndex in the testmode.ini file must be specified in decimal. The converted number should be entered into testmode.ini. The TestModeIndex must be a valid bus number of an ioDrive installed in the system.

The Fusion-io SNMP subagent now replaces any existing ioDrive driver data it may have for the ioDrive specified by TestModeIndex with any populated fields in the list of parameters. If a field is not populated, the subagent retains the existing data and reports it to the MIB. If there is a value in a field, then the subagent replaces that data and reports it to the MIB.

The subagent continues in test mode until the .INI file parameter is set to OFF. The test mode information is described in the testmode.ini file:

# SNMP Test Mode sample file.

# These values may be used to test the SNMP subsystem when it is in test mode.


[SNMP Agent Test Mode]

TestMode = off

TestModeIndex = 0


# InfoState: Note that the following states may change, but current definitions are:

# 0 = unknown

# 1 = detached

# 2 = attached

# 3 = minimal mode

# 4 = error

# 5 = detaching

# 6 = attaching

# 7 = scanning

# 8 = formatting

# 9 = updating firmware

# 10 = attach

# 11 = detach

# 12 = format

# 13 = update

InfoState = 2

InfoCurrentTemp = 72

InfoWearoutIndicator = 2 ; 2=normal, 1=device is wearing out.

InfoNonWritableIndicator = 2 ; 2=normal, 1=device is wearing out.

InfoFlashbackIndicator = 2 ; 2=normal, 1=flashback protection degraded.

ExtnTotalPhysCapacityU = 23

ExtnTotalPhysCapacityL = 215752192

ExtnUsablePhysCapacityU = 21

ExtnUsablePhysCapacityL = 7852192

ExtnUsedPhysCapacityU = 4

ExtnUsedPhysCapacityL = 782330816

ExtnTotalLogCapacityU = 18

ExtnTotalLogCapacityL = 2690588672

ExtnAvailLogCapacityU = 14

ExtnAvailLogCapacityL = 3870457856

ExtnBytesReadU = 18

ExtnBytesReadL = 3690588672

ExtnPhysBytesWrittenU = 4

ExtnPhysBytesWrittenL = 2578550816

ExtnLogBytesWrittenU = 3

ExtnLogBytesWrittenL = 2 ; 2=normal, 1=flashback

InfoPercentLifeRemaining = 95


SNMP MIB Support

The following SNMP MIB fields are supported in Linux:

ioDrvMibRevMajor ioDrvMibRevMinor

ioDrvMibCondition ioDrvInfoIndex

ioDrvInfoStatus ioDrvInfoName

ioDrvInfoSerialNumber ioDrvInfoPartNumber

ioDrvInfoSubvendorPartNumber ioDrvInfoSparesPartNumber

ioDrvInfoAssemblyNumber ioDrvInfoFirmwareVersion

ioDrvInfoDriverVersion ioDrvInfoUID

ioDrvInfoState ioDrvInfoClientDeviceName

ioDrvInfoBeacon ioDrvInfoPCIAddress

ioDrvInfoPCIDeviceID ioDrvInfoPCISubdeviceID

ioDrvInfoPCIVendorID ioDrvInfoPCISubvendorID

ioDrvInfoPCISlot ioDrvInfoWearoutIndicator

ioDrvInfoFlashbackIndicator ioDrvInfoNonWritableIndicator

ioDrvInfoCurrentTemp ioDrvInfoPercentLifeRemaining

ioDrvExtnIndex ioDrvExtnTotalPhysicalCapacityU

ioDrvExtnTotalPhysicalCapacityL

ioDrvExtnUsablePhysicalCapacityU ioDrvExtnUsablePhysicalCapacityL

ioDrvExtnTotalLogicalCapacityU ioDrvExtnTotalLogicalCapacityL

ioDrvExtnAvailableLogicalCapacityU ioDrvExtnAvailableLogicalCapacityL

ioDrvExtnBytesReadU ioDrvExtnBytesReadL

ioDrvExtnPhysicalBytesWrittenU ioDrvExtnPhysicalBytesWrittenL