此内容没有您所选择的语言版本。

Chapter 11. Additional Services


This chapter discusses useful MBean services that are not discussed elsewhere either because they are utility services not necessary for running JBoss, or they don't fit into a current section of the book.

11.1. Exposing MBean Events via SNMP

JBoss has an SNMP adaptor service that can be used to intercept JMX notifications emitted by MBeans, convert them to traps and send them to SNMP managers. In this respect the snmp-adaptor acts as a SNMP agent. Future versions may offer support for full agent get/set functionality that maps onto MBean attributes or operations.
This service can be used to integrate JBoss with higher order system or network management platforms (HP OpenView, for example), making the MBeans visible to those systems. The MBean developer can instrument the MBeans by producing notifications for any significant event (server coldstart, for example), and the adaptor can then be configured to intercept the notification and map it onto an SNMP traps. The adaptor uses the JoeSNMP package from OpenNMS as the SNMP engine.
The SNMP service is configured in snmp-adaptor.sar. This service is only available in the all configuration, so you will need to copy the .sar file to your configuration if you want to use the service from another profile.
Inside the snmp-adaptor.sar directory, there are two configuration files that control the SNMP service.

managers.xml
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”.
notifications.xml
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”.
The SNMPAgentService MBean is configured in snmp-adaptor.sar/META-INF/jboss-service.xml.
The configurable parameters are:
Expand
Table 11.1. 
Parameter Description
HeartBeatPeriod The period in seconds at which heartbeat notifications are generated.
ManagersResName Specifies the resource name of the managers.xml file.
NotificationMapResName Specifies the resource name of the notifications.xml file.
TrapFactoryClassName The org.jboss.jmx.adaptor.snmp.agent.TrapFactory implementation class that takes care of translation of JMX Notifications into SNMP V1 and V2 traps.
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

TrapdService is 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. SnmpAgentService and TrapdService are not dependent on each other.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat