Find More DocumentationFeatured Support Resources | Download this book in PDF (1013 KB)
Chapter 10 Migration of Solstice Enterprise Agents to the System Management AgentThis chapter contains information for developers who want to migrate a subagent from Solstice Enterprise Agents to use in the System Management Agent. The chapter uses demo_module_12 to illustrate procedures. The following topics are discussed: Why Migrate to SMA?Support for the Solstice Enterprise Agents software might be discontinued in a future Solaris release. For this reason, any Solstice Enterprise Agents subagents that you have created must be migrated to use the SMA. In this Solaris release, you can run the Solstice Enterprise Agents software and associated subagents concurrently with the SMA. The Solstice Enterprise Agents product includes mibiisa, a subagent that implements MIB-II and the Sun MIB. In SMA, the functionality of mibiisa is implemented by the MIB-II portion of the SMA agent and a new Sun extensions subagent. By default, the mibiisa subagent is disabled in this Solaris release. Requests for MIB-II are handled by the SMA agent directly. Requests for the extensions in the Sun MIB are handled by the seaExtensions module, if that module has been loaded. Requests for the Solstice Enterprise Agents master agent, which implements the snmpdx.mib, are handled by the seaProxy module if that module has been loaded. The seaProxy module generates dynamic proxies based on static and dynamic Solstice Enterprise Agents subagent registrations. The proxies are not statically defined in snmpd.conf. Note that the seaProxy module does not generate proxies for the mibiisa subagent itself. After the dynamic proxies are generated, the agent's proxy mechanism handles the forwarding of those requests to the Solstice Enterprise Agents master agent. Solstice Enterprise Agents subagents can still be used with the Solstice Enterprise Agents master agent, and thus with SMA by using the seaProxy module, as explained in Solaris System Management Agent Administration Guide. However, SMA support of the Solstice Enterprise Agents software is for a limited transitional time. You should migrate any Solstice Enterprise Agents subagents that you have implemented to use the SMA as early as possible. Solstice Enterprise Agents Migration Strategy OverviewThe general process for implementing a Solstice Enterprise Agents subagent as an SMA module is as follows:
The following section uses an example MIB in demo_module_12 to illustrate this migration process. Migrating Solstice Enterprise Agent Subagents to SMAThe SMA does not provide a comprehensive tool to migrate a Solstice Enterprise Agents subagent to an SMA module. A Solstice Enterprise Agents subagent uses two types of API functions. One type of API function is used for interaction with the master agent, and the other type is used for custom implementation. The functions for interaction with the master agent are common among all subagents. No tool is available that can separate the two types of functions, and put only the custom implementation code automatically into the corresponding place in the mib2c-generated code. The simplest way to migrate a Solstice Enterprise Agents subagent is first to use the MIB tools of each environment to create code templates for each environment. The following table compares aspects of the SMA mib2c tool and the Solstice Enterprise Agents mibcodegen tool. This comparison might help you to understand the code templates that each tool produces. Table 10–1 Comparison of MIB Tools in SMA and Solstice Enterprise Agents Software
demo_module_12 Code Example for Solstice Enterprise Agents Subagent MigrationThe demo_module_12 demonstrates how to implement a Solstice Enterprise Agents subagent as an SMA module. The demo_module_12 code example is by default located in the directory /usr/demo/sma_snmp/demo_module_12. The README_demo_module_12 file within that directory contains instructions that describe how to perform the following tasks:
You should perform the procedures in demo_module_12 to produce the templates that are analyzed in the following section. Analysis of the demo_module_12 Solstice Enterprise Agents TemplatesThe mibcodgen tool produced several files. The following table describes and analyzes the files. Table 10–2 Comparison of Solstice Enterprise Agents Templates to SMA Templates
Modifying the SMA Instrumentation CodeAfter you generate and analyze the templates, the task then is to extract the core SNMP get, getnext, and set processing out of the Solstice Enterprise Agents subagent code, and move it to the get and set handler and get_first/get_next methods defined in the SMA module approach. The index handling is removed from each get and set function in Solstice Enterprise Agents code to be handled by the SMA. Special methods are used for tables. Context fields are used to store the current index information so that advancing in the table is relatively simple. |
||||||||||||||||||||||||||||||