Main Page Class Hierarchy Compound List File List Compound Members File Members Related Pages
ResourceMonitorSNMPSubagent Documentation
0.5
Introduction
The purpose of this project is to enable ResourceMonitor to be remotely accessed/managed through SNMP protocol. For more information regarding ResourceMonitor, see below.
ResourceMonitor
ResourceMonitor provides a consistent programming access to statistics and create threshold, watermark, leakybucket monitors for any instrumented subsystem in the Linux operating system.
Directory Structures
- config: configuration scripts for aclocale, autoconf, automake, autoheader.
- mibs: the MIB files for ResourceMonitor.
- resmon: the UCD-SNMP subagent implementation for ResourceMonitor.
- rmclient: the library that used by both subagents.
- test: some test programs.
MIBs
CGL-RESOURCE-MONITOR-MIB
This file defines all the operations can be applied towards ResourceMonitor, including:
- Enumerate through all the subsystems that's currently registered with ResourceMonitor Daemon.
- Query the subsystems about statistics and resources.
- Create monitors on certain subsystem/resource/statistic combination.
- Getting SNMP notification when any of these events occur:
- Subsystem added/removed.
- Resource online/offline.
- Plugin added/removed.
- Any monitoring events (threshold/leakybucket).
Design
In order to use SNMP to control the ResourceMonitor, the subagent has to act like a proxy between the main SNMP agent and the ResourceMonitor or Event daemon. The subagent talks to ResourceMonitor through their APIs. The communication between subagent and SNMP can be of many things, SMUX, AgentX, or a proxy agent.
Since UCD-SNMP is the de facto standard in Linux distributions, we decide to use it as the development platform. The real version of UCD-SNMP we developed on is UCD-SNMP 4.2.5. And the subagent protocol we used is AgentX. The basic idea is very simple.
- Define the MIB file that is needed by ResourceMonitor and Linux Event Log,
- Use mib2c that comes with UCD-SNMP to generate subagent skeleton code,
- Implement the subagent. Do some coding here.
RMClient library
RMClient is a library that contains all the code necessary to maintain the MIB tables, talking to ResourceMonitor and Linux Event Log Daemon, and sending out SNMP traps when events occur. Please refer to the Doxygen output for the class structures.
Compile
- run the aaaa script inside src/config directory. This takes care of aclocale, autoheader, autoconf, automake.
- ./configure; make
Test
The following are some easy steps to get you going. Once you know what you are doing, you can always tweak this to fit your needs.
- Make sure both ResourceMonitor and Evlog are installed.
- Make sure you have UCD-SNMP installed. UCD-SNMP 4.2.5 prefered.
- Copy all 3 mibs inside MIB directory to your system MIBs location, normally, /usr/share/snmp/mibs, or /usr/local/share/snmp/mibs.
- Copy the snmpd.conf.example file to /etc/snmp/snmp.conf.
- /etc/rc.d/init.d/snmp restart
- run the subagents in resmon directory, namely, the rmSubagent.
- do "export MIBS=ALL"
- run "snmpwalk localhost public ResourceMonitor" If everything goes well, you should see some output.
Generated on Tue Sep 10 16:46:32 2002 for ResourceMonitorSNMPSubagent by
1.2.14 written by Dimitri van Heesch,
© 1997-2002