Chapter 11. Additional Services
11.1. Exposing MBean Events via SNMP
snmp-adaptor.sar. This service is only available in the
allconfiguration, so you will need to copy the
.sarfile to your configuration if you want to use the service from another profile.
snmp-adaptor.sardirectory, there are two configuration files that control the SNMP service.
- This file configures where to send traps. The content model for this file is shown in Figure 11.1, “The schema for the SNMP managers file”.
- This file specifies the exact mapping of each notification type to a corresponding SNMP trap. The content model for this file is shown in Figure 11.2, “The schema for the notification to trap mapping file”.
SNMPAgentServiceMBean is configured in
|HeartBeatPeriod||The period in seconds at which heartbeat notifications are generated.|
|ManagersResName|| Specifies the resource name of the |
|NotificationMapResName|| Specifies the resource name of the |
|TrapFactoryClassName|| The |
|TimerName||Specifies the JMX ObjectName of the JMX timer service to use for heartbeat notifications.|
|SubscriptionList||Specifies which MBeans and notifications to listen for.|
Figure 11.1. The schema for the SNMP managers file
Figure 11.2. The schema for the notification to trap mapping file
TrapdServiceis a simple MBean that acts as an SNMP Manager. It listens to a configurable port for incoming traps and logs them as DEBUG messages using the system logger. You can modify the log4j configuration to redirect the log output to a file.
TrapdServiceare not dependent on each other.