![]() ![]() ![]() |
5.1 Overview
5.2 Configuring Source Code Generation
5.8 Configuring JMX Standard Services
5.9 Configuring WebNMS Services
5.10 Compile Options
JMX Compiler allows you to configure the Project from the User Interface (UI) itself. This configuration is done using the Settings panel invoked using any one of the following: (1) Project -> Settings menu option (2) Settings icon from the toolbar (3) Ctrl+Shift+S hot key. This chapter describes the various settings that can be configured while working with the Multi-Protocol agent.
5.2 Configuring Source code generation
Selecting Source Code Generation -> General option, from the Project -> Settings tree, provides general code generation options, based on which code is generated for the Multi-Protocol agent. Each option provided in this panel, is explained below.
The Package Name provided in this option, will be taken as the package name for the generated Java files. The default package name provided is com.myCompany.myPackage. You can specify any other name other than the default name provided.
The Agent Name provided in this option, refers to the Main File Name. The default name specified is WebNMSJMXAgent. You can specify any other name other than the default name provided.
5.2.3 Merge with previous stub files
This option is used to merge the user added code, with the newly generated code. If this option is not selected, the information added by the user will be lost. By default, merge with stub files option is checked. For more information on Merging, please refer the topic Code Merging.
The easiest way to test the Notification generation is, send the Notification, if the trap variable is accessed by the manager. If the option, JMX Notification on Set is selected in Settings -> Source generation, the JMX Compiler will generate code fragment (call to send the corresponding notification) in the following files :
For a Scalar group : xxxInstrumentExt.java
For a Table group : xxxEntryExt.java
This code is generated for each trap variable defined in the MIB. The corresponding Notification function is generated in the Main file. On calling this function the corresponding Notification will be sent to the registered managers. This function can be called from anywhere in the agent.
If this flag is not SET, then the code fragment will not be generated. This option is selected by default.
|
Note: Trap variable, is one of the objects defined in the trap or notification construct of the MIB. Hence it is required to define the Trap type or Notification type before choosing the option to generate notification on SET. |
Agent Toolkit provides command line options for code generation. This feature is not designed to be used as a standalone utility but intended to add command line control to GUI-assisted agent development process. The project file serves as the input.
5.2.6 Location of Commandline Utilities
The script files responsible for invoking the Command Line Utilities are available under <ATKT_Home>/bin directory where <ATKT_Home> is the working directory of Command Line Utility. The relevant script files are generated under the working directory as JMXAgentSourceGen.bat / JMXAgentSourceGen.sh files.
5.2.7 Operating the Commandline Utilities
To accomplish the command line source generation, the following command has to be executed.
//Syntax of the Command in Windows Operating Environment ATKT_Home\bin\XXXAgentSourceGen.bat -x <Project file location>
//Syntax of the Command in Linux/Solaris Operating Environment sh ATKT_Home\bin\XXXAgentSourceGen.sh -x<Project file location>
//A typical input will look like this: ATKT_Home\bin\JMXAgentSourceGen -x C:\WebNMS\JavaAgent\jmxprojects\TestProject\TestProject.prj |
5.2.8 Instrument with Interface
Select the option to support interface mode of code generation. For a non-table group node, the Interface file will be generated as xxxInterface.java. For a table node, the Interface file will be generated as xxxEntryInterface.java file. You have to implement this interface.
This option is not selected by default.
5.2.9 Synchronized Set Methods
The option Synchronized set methods generates code with the set methods in the entry/instrument files as synchronized. This option may be extremely useful when running the multiple agents in a single JVM with the same stubs answering for requests on all the agents
This option is selected by default.
The option Package Agent in Build Menu, when selected, copies the required agent binaries for running the agent from the <WebNMS/JavaAgent> directory into <Agent Toolkit Home>/jmxprojects/<projectname>/agent folder. This makes the agent self-contained and it can be used as an independent project. Please refer the topic Packaging the Agent for more information.
5.2.11 Asynchronous Message Processing
Asynchronous Message Processing is supported in SNMP protocols. It enables the SNMP adaptor in the Multi-Protocol agent to handle more than one request simultaneously.
Asynchronous Message processing is achieved by using Multithreading. Every functionality of the SNMP Agent runs in a separate thread and can be accessed for Asynchronous Message processing.
The user can enter the number of threads that the agent needs to support. The default number of threads configured in the JMX Compiler is 2. The maximum number of requests that can be handled at a time is 20.
Configuring Asynchronous Message Processing using API calls :
For running the SNMP adaptor in asynchronous mode add the following piece of code in the Main file generated inside the method generated for registering the SNMP adaptor.
snmpadaptor.setAsynchronousMode(new Boolean(true)); |
By default the number of threads created will be one. And the maximum number of threads that can be handled is 20. This can be altered by calling snmpadaptor.setMaxThreads(int) in the Main file. This code gets generated, if asynchronous mode is set "true".
5.2.12 View based Authorization
View-Based Authorization Support provides an authentication mechanism to restrict the users' access to a Multi-Protocol agent. The users entitled to log on to the system alone would be configured with a user name and password, along with the details of the privileges they can avail, i.e., the extent of access allowed. The unauthorized client would not be able to infiltrate.
Please refer the topic, View-Based Access Support for MBeans in Multi-Protocol Agent for more information.
When the Agent is running, it generates log messages for you to know about the Agent processing. These log messages are stored in a text file called agent(n).log. Each log message has an associated log Level. The Level gives a rough idea about the importance and urgency of a log message. You can select the level of log message to be recorded in the log file. Each of these Debug levels are explained in the topic, Logging support for the Multi-Protocol agent.
Data held by the Multi-Protocol agent may either be stored in Text files, XML files, Databases, runtime Memory or can be retrieved from external applications (user storage model). The storage options depend on the data held by the run time agent. Please refer the topic Supported Storage Types for MBeans to know more about the storage options provided by the Multi-Protocol agent.
The JMX Compiler provides options to configure the SNMP adaptor supported by the Multi-Protocol agent. By default code is generated for SNMP adaptor, with the default configurations.
To disable support for the SNMP adaptor or configure the SNMP adaptor settings, select Adaptors -> SNMP -> General in the Settings tree structure.
The following general options for the SNMP adaptor can be configured here.
SNMP Adaptor : When this option is selected, code is generated for SNMP Adaptor to get registered with MBean Server thus allowing management through SNMP. If this option is not selected, the Multi-Protocol agent will be generated without SNMP support.
SNMP Port : Specify the port number where the SNMP agent is started. The default port number is 8001.
Version: The supported SNMP versions are v1/v2c/v3. Select the version to be supported by the SNMP agent.
Disable Startup Trap: By default, the generated agent sends coldstart trap at the agent startup to the managers being configured. The user can disable the trap at agent startup by enabling the option provided in the MIB Compiler UI by choosing Project->Settings->Source Generation ->Disable Startup Trap.
5.3.2 Configuring acl table/vacl table for v1v2Authentication
The SNMP Adaptor of the Multi-Protocol agent supports Community based Authentication and View based access control for SNMPv1 and SNMPv2c requests. On receiving a SNMPv1 or SNMPv2c message from the manager, the agent will check for authentication with the received community string and the received SNMP message type (GET,GET-NEXT etc.). The view based access for v1/v2c agents is specified purely based on the community specified in the aclTable. Only if the community is authenticated in the aclTable, can that be given view based access.
Please refer the topic, SNMP Adaptor - Authentication which explains the options provided in the JMX compiler to configure the acl and vacl Tables.
5.3.3 Configuring Trap Forwarding Table
For sending Traps and Notifications to multiple Managers, a table called the Trap Forwarding or Manager Table is maintained by the SNMP agent. This table stores all the Manager's information.
Please refer the topic SNMP Adaptor - Traps which explains the options provided in the JMX Compiler to configure the Trap Forwarding Tables.
5.3.4 Configuring USM and VACM Tables
To configure the SNMPv3 agent with USM and VACM entries,the USMUserTable and VACM tables are maintained by the SNMP agent.
Please refer the topic,SNMP Adaptor - SNMPv3 which explains the options provided in the JMX Compiler to configure the USM and VACM Tables.
The JMX Compiler provides options to configure the HTML adaptor supported by the Multi-Protocol agent. By default code is generated for HTML adaptor, with the default configurations. To disable support for the HTML adaptor or configure the HTML adaptor settings, select Adaptors -> HTML -> General in the Settings tree structure.
The following general options for the HTML adaptor can be configured here.
HTML Adaptor
When this option is selected, code is generated for HTML Adaptor to get registered with MBean Server thus allowing management through HTML. If this option is not selected, the Multi-Protocol agent will be generated without HTML support.
HTML Port
Specify the port number where the HTML service is started. The default port number is 8030.
SSL refers to the Secured Socket Layer protocol which provides authenticated and encrypted communication between clients and servers. Select the SSL Support option in Adaptors -> HTML -> SSL to provide SSL support to the HTML Agent.
Please refer the topic HTML Adaptor - Using SSL for Communication Through HTML Adaptor to know more about SSL.
The HTML Adaptor of WebNMS Agent Toolkit supports authentication feature. A simple challenge-response authentication mechanism is adopted, where the server may challenge the client and the client responds with the authentication information. When a user connects to the agent through the HTML Adaptor, authentication is done based on user name and password.
Please refer the topic HTML Adaptor - Authentication to know more about the authentication feature
The following options provided in Settings -> Adaptors -> RMI, is used for configuring the RMI Connector.
RMI Connector
When this option is selected, code is generated for RMI Connector to get registered with MBean Server thus allowing management through RMI. If this option is not selected, the Multi-Protocol agent will be generated without RMI support.
RMI Port
Specify the port number where the RMI Service gets started. The default port number is 1099.
Authentication
The RMI adaptor exposes the attributes and operations of all the MBeans registered with the MBean server of the JMX Agent. You may want to restrict the access to the MBean information. This can be done using the Authentication feature. Here, the user is authenticated based on the user name and password.
The Authentication feature may be enabled either from the JMX Compiler user interface or by using API calls. Please refer the topic RMI Adaptor to know more about configuring authentication
The following options provided in Settings -> Adaptors -> CORBA, is used for configuring the CORBA Connector.
CORBA Connector
When this option is selected, code is generated for CORBA Connector to get registered with MBean Server thus allowing management through CORBA. If this option is not selected, the Multi-Protocol agent will be generated without CORBA support.
CORBA Port
Specify the port number where the CORBA Service gets started. The default port number is 1050.
Authentication
The CORBA connector exposes the attributes and operations of all the MBeans registered with the MBean server of the Multi-Protocol agent. You may want to restrict the access to the MBean information. This can be done using the Authentication feature. Here, the user is authenticated based on the user name and password.
The Authentication feature may be enabled either from the JMX Compiler user interface or by using API calls. Please refer the topic CORBA Adaptor to know more about configuring authentication.
5.7 Configuring HTTP Connector
The following options provided in Adaptors -> HTTP, is used for configuring the HTTP Connector.
HTTP connector
When this option is selected, code is generated for HTTP Connector to get registered with the HTTP; Server thus allowing management through HTTP. If this option is not selected, the Multi-Protocol agent will be generated without HTTP support
HTTP Port
Specify the port number where the HTTP Service gets started. The default port number is 8050.
SSL refers to the Secured Socket Layer protocol which provides authenticated and encrypted communication between clients and servers. Select the SSL Support option in Adaptors -> HTTP -> SSL to provide SSL support to the HTTP Agent.
Please refer the topic HTTP Connector - Using SSL for Communication Through HTTP Connector to know more about SSL.
The HTTP Connector of WebNMS Agent Toolkit supports authentication feature. A simple challenge-response authentication mechanism is adopted, where the server may challenge the client and the client responds with the authentication information. When a user connects to the agent through the HTTP Connector, authentication is done based on user name and password.
Please refer the topic HTTP Connector - Authentication to know more about the authentication feature
5.8 Configuring JMX Standard Services
WebNMS Agent Toolkit supports the following JMX standard services. These services can be configured from the JMX Compiler by selecting JMX Standard Services in the Project -> Settings tree. The links provided will take you to the respective chapter which describes in detail the implementation details and the procedure to configure the service from JMX Compiler UI.
5.9 Configuring WebNMS Services
In addition to the JMX Mandatory services WebNMS Agent Toolkit provides the following some proprietary services. The JMX Compiler allows you to configure these services by selecting WebNMS Services in the Project -> Settings tree. The links provided will take you to the respective chapter which describes in detail the implementation details and the procedure to configure the service from JMX Compiler UI.
The following options are available under Settings -->Compile Options.
Compile Options
This option is used for giving "javac" options as input while compiling. The various options of "javac" can be got by typing "javac -help" in the command line.
Classpath Settings
This option is used to add the required classpath settings that will be used during the source compilation.
You can browse and select the required class files/jar files to be added to the classpath settings, using the Add button. Similarly, if any settings are not required, the same can be deleted using the delete button.
![]() ![]() ![]() |