Dylan Hansen
2005-03-16 23:35:59 UTC
Greetings everyone,
We are currently having an issue setting up SNMP monitoring using
OpenNMS, and I have decided to post to this list to see if anyone out
there has a similar configuration as we do, and if you could give me
any pointers. Here is what we'd like to do:
Currently, we have our applications running on a distributed system
using JBoss 4. JBoss uses Log4j, much like OpenNMS does. We currently
use the SMTP appender in our JBoss Log4j configuration, which will fire
off an e-mail to our on-call phone when an error occurs. This works
fine for intermittent error messages, but when there is a major problem
with our system, we get fired off hundreds of e-mails to the on-call
phone, overloading it. A better solution in our eyes would have
OpenNMS page the on-call phone when the amount of JBoss errors exceeds
a certain threshold. Also, it would be nice to have SNMP data reports
on the amount of warnings and errors that are in our logs.
Log4j does provide a SNMP trap appender, which uses the JoeSNMP
library, that will fire off a trap to the specified management host.
The issue I am having is that OpenNMS does not receive these traps when
they occur. I have not gotten to the point where I have to configure
OpenNMS to build graphs based on the SNMP data, I am first trying to
get OpenNMS to recognize the fact that it received the trap.
So, I'm curious as to what sort of configuration on the OpenNMS side is
required. I notice in the event log of the node I am sending the traps
from, that it has received traps before as an "unformatted enterprise
event". Although these aren't the traps being sent from Log4j, I would
assume that the Log4j traps would be received in the same way. Then,
there would have to be some configuring on the OpenNMS side to parse
the event OID and gather data upon that. Am I correct in this? Or am
I missing a step here in having OpenNMS recognize an event, whether it
is formatted or not?
If anyone subscribed to this list has successfully had OpenNMS receive
Log4j traps, I would be interested in hearing from you. A snipped of
my log4j.xml file is included below (in this configuration, I have the
threshold set to INFO so I don't have to generate an error for
testing):
<appender name="TRAP_LOG"
class="org.apache.log4j.ext.SNMPTrapAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="ImplementationClassName"
value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
<param name="ManagementHost" value="192.*.*.1"/>
<param name="ManagementHostTrapListenPort" value="162"/>
<param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
<param name="LocalIPAddress" value="192.*.*.50"/>
<param name="LocalTrapSendPort" value="161"/>
<param name="GenericTrapType" value="6"/>
<param name="SpecificTrapType" value="12345678"/>
<param name="CommunityString" value="public"/>
<param name="ForwardStackTraceWithTrap" value="true"/>
<param name="Threshold" value="INFO"/>
<param name="ApplicationTrapOID"
value="1.3.6.1.4.1.24.12.10.22.64"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d,%p,[%t],[%c],%m%n"/>
</layout>
</appender>
<category name="com.how2share">
<priority value="INFO"/>
<appender-ref ref="TRAP_LOG"/>
</category>
<root>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="TRAP_LOG"/>
<appender-ref ref="SMTP"/>
</root>
If anyone else is looking for a similar solution, the website to the
SNMPTrapAppender is:
http://www.m2technologies.net/asp/snmpTrapAppender.asp
Any input is appreciated, thank you very much for your time!
Dylan Hansen
How2Share Technologies Inc.
PS. A couple of my colleagues that went to JBoss World in Atlanta said
they had the opportunity to meet some of you nice OpenNMS folks.
Hopefully I too will have the pleasure sometime in the future!
We are currently having an issue setting up SNMP monitoring using
OpenNMS, and I have decided to post to this list to see if anyone out
there has a similar configuration as we do, and if you could give me
any pointers. Here is what we'd like to do:
Currently, we have our applications running on a distributed system
using JBoss 4. JBoss uses Log4j, much like OpenNMS does. We currently
use the SMTP appender in our JBoss Log4j configuration, which will fire
off an e-mail to our on-call phone when an error occurs. This works
fine for intermittent error messages, but when there is a major problem
with our system, we get fired off hundreds of e-mails to the on-call
phone, overloading it. A better solution in our eyes would have
OpenNMS page the on-call phone when the amount of JBoss errors exceeds
a certain threshold. Also, it would be nice to have SNMP data reports
on the amount of warnings and errors that are in our logs.
Log4j does provide a SNMP trap appender, which uses the JoeSNMP
library, that will fire off a trap to the specified management host.
The issue I am having is that OpenNMS does not receive these traps when
they occur. I have not gotten to the point where I have to configure
OpenNMS to build graphs based on the SNMP data, I am first trying to
get OpenNMS to recognize the fact that it received the trap.
So, I'm curious as to what sort of configuration on the OpenNMS side is
required. I notice in the event log of the node I am sending the traps
from, that it has received traps before as an "unformatted enterprise
event". Although these aren't the traps being sent from Log4j, I would
assume that the Log4j traps would be received in the same way. Then,
there would have to be some configuring on the OpenNMS side to parse
the event OID and gather data upon that. Am I correct in this? Or am
I missing a step here in having OpenNMS recognize an event, whether it
is formatted or not?
If anyone subscribed to this list has successfully had OpenNMS receive
Log4j traps, I would be interested in hearing from you. A snipped of
my log4j.xml file is included below (in this configuration, I have the
threshold set to INFO so I don't have to generate an error for
testing):
<appender name="TRAP_LOG"
class="org.apache.log4j.ext.SNMPTrapAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="ImplementationClassName"
value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
<param name="ManagementHost" value="192.*.*.1"/>
<param name="ManagementHostTrapListenPort" value="162"/>
<param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
<param name="LocalIPAddress" value="192.*.*.50"/>
<param name="LocalTrapSendPort" value="161"/>
<param name="GenericTrapType" value="6"/>
<param name="SpecificTrapType" value="12345678"/>
<param name="CommunityString" value="public"/>
<param name="ForwardStackTraceWithTrap" value="true"/>
<param name="Threshold" value="INFO"/>
<param name="ApplicationTrapOID"
value="1.3.6.1.4.1.24.12.10.22.64"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d,%p,[%t],[%c],%m%n"/>
</layout>
</appender>
<category name="com.how2share">
<priority value="INFO"/>
<appender-ref ref="TRAP_LOG"/>
</category>
<root>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="TRAP_LOG"/>
<appender-ref ref="SMTP"/>
</root>
If anyone else is looking for a similar solution, the website to the
SNMPTrapAppender is:
http://www.m2technologies.net/asp/snmpTrapAppender.asp
Any input is appreciated, thank you very much for your time!
Dylan Hansen
How2Share Technologies Inc.
PS. A couple of my colleagues that went to JBoss World in Atlanta said
they had the opportunity to meet some of you nice OpenNMS folks.
Hopefully I too will have the pleasure sometime in the future!