
This is an implementation of the Service Availability Forum's 
Hardware Platform Interface SNMP sub-agent.

Through this subagent one can includes support for multiple different 
types of hardware including: IPMI, IBM Blade Center (via SNMP), 
Linux Watchdog devices, and Sysfs based systems.


---------------------------------------------------------
PREREQUISITES
---------------------------------------------------------
The following software is required to build 'openhpi-subagent'
Any implementation that is based on SAF specification SAI-HPI-B.01.01. 

Recommended: 'openhpi' >= 2.0.4
autoconf >= 2.57
automake >= 1.5
gcc      >= 3.2.0
uuid.h      (may be found in e2fsprogs-devel or uuid-dev)net-snmp >= 5.1.2
	(Don't use earlier versions - the AgentX protocol had some
	 serious issues).
	(Don't use 5.0.7 - it has a bug in the CONTAINER operations that 
	 seg faults the sub-agent).
GLIB-2.1

---------------------------------------------------------
BUILD / INSTALLATION
---------------------------------------------------------
First time to extract the code:
run ./boostrap

This will generate all files needed to compile.

after running the bootstrap script, run:
	./configure

then make (or make rpm)
and then (as root or with proper system install permissions)
	make install (or install from the rpm).

It will generate the subagent code and put the configuration file 
- hpiSubagent.conf in the NetSNMP configuration directory.

If you want to generate the guide, run:
        make pdf-m

in the docs directory.
---------------------------------------------------------
RUNNING
---------------------------------------------------------

1. Configure your OpenHPI installation to work. Make sure that 
   /etc/openhpi/openhpi.conf lists the desired plugin.

2. Configure your NetSNMP configuration file (snmpd.conf) to include
   "master  agentx"

3. Start the NetSNMP daemon. (usually /etc/init.d/snmpd on various Linux distros).

4. Start the hpiSubagent. (either use the runtime script: /etc/init.d/openhpi-subagent,
   or just run it from the terminal).  You should see something similar in the
   syslog log file - /var/log/messages:

   ...
   Feb  6 10:53:37 konrad hpiSubagent[9890]: Not sending events during startup.
   Feb  6 10:53:37 konrad hpiSubagent[9890]: Checking HPI infrastructure every 4 seconds.
   Feb  6 10:53:37 konrad hpiSubagent[9890]: Max Event rows 1024.
   ...

5. Browse the MIB tree. When browsing the MIB tree, make sure you 
   load the MIB in your favorite SNMP browser. If you are using 
   NetSNMP commands, set the MIBS environment variable to ALL:

   $export MIBS=ALL
  
   And set the MIBDIRS enviroment variable to point to the the directory where the 
   OpenHPI MIB file is located (usr/share/doc/openhpi-subagent-0.2/mib) or
   copy the MIB file in to the NetSNMP MIB default directory (usually 
   /usr/share/snmp/mibs). To set the MIBDIRS, refer to 'man snmpcmd' or:

   $export MIBDIRS=+/usr/share/doc/openhpi-subagent-0.2/mibs

   After these step you should have no trouble browsing the HPI MIB:

   $snmpwalk -v2c -c public localhost HPI:MIB hpiB0101
   HPI-MIB::saHpiRdrIsFru.1.2.false.131076 2
   HPI-MIB::saHpiRdrRowPointer.1.1.false.65541 HPI-MIB::saHpiCtrlDigitalNum.4294967295.1.false.0
   HPI-MIB::saHpiRdrRowPointer.1.1.false.65543 HPI-MIB::saHpiCtrlDigitalNum.4294967295.1.false.1
   HPI-MIB::saHpiRdrRowPointer.1.1.false.131073 HPI-MIB::saHpiSensorNum.4294967295.1.false.1
   HPI-MIB::saHpiRdrRowPointer.1.1.false.131075 HPI-MIB::saHpiSensorNum.4294967295.1.false.3
   HPI-MIB::saHpiRdrRowPointer.1.1.false.196614 HPI-MIB::saHpiInventoryPersistent.4294967295.1.false.6
   HPI-MIB::saHpiRdrRowPointer.1.1.false.196616 HPI-MIB::saHpiInventoryPersistent.4294967295.1.false.8
   HPI-MIB::saHpiRdrRowPointer.1.2.false.131074 HPI-MIB::saHpiSensorNum.4294967295.2.false.2
   HPI-MIB::saHpiRdrRowPointer.1.2.false.131076 HPI-MIB::saHpiSensorNum.4294967295.2.false.4
   HPI-MIB::saHpiRdrRPT.1.1.false.65541 HPI-MIB::saHpiResourceId.1.1.false
   HPI-MIB::saHpiRdrRPT.1.1.false.65543 HPI-MIB::saHpiResourceId.1.1.false
   HPI-MIB::saHpiRdrRPT.1.1.false.131073 HPI-MIB::saHpiResourceId.1.1.false
   HPI-MIB::saHpiRdrRPT.1.1.false.131075 HPI-MIB::saHpiResourceId.1.1.false
   .....

6). If you want to receive traps make sure you are running a SNMP trap daemon
    (NetSNMP provides one - snmptrapd). 
    Furthermore make sure that the SNMP daemon is configured to send traps 
    and specify its destination, such as:
    "inform2sink <hostname>" in snmpd.conf.
    Refer to 'man snmpd.conf' for more details.

---------------------------------------------------------
CLEANUP
---------------------------------------------------------
To remove the temporary build files, type:

make clean

If you are a maintainer, and need to remove all autogenerated files, type:

make clean
make maintainer-clean


---------------------------------------------------------
GENERAL RELEASE NOTES and WHAT'S NEW
---------------------------------------------------------

* First release of openhpi-subagent SAI-HPI-B.01.01 release compliant. 

---------------------------------------------------------
FOR MORE INFO
---------------------------------------------------------

For more information please see the project website at 
http://openhpi.sourceforge.net

Also visit SAForum's website at http://www.saforum.org


---------------------------------------------------------
BUGS
---------------------------------------------------------
Branch 2.0.4 of openhpi does not completely discover all
Inventory Area's.

Presently compilation results in 'warnings'.

The conversion of some enumerations to string representations
results in the truncation of the strings.  This is not the
case when using openhpi 'HEAD'.

---------------------------------------------------------
DEFINES
---------------------------------------------------------

