TIBCO log4j SNMP Appender

Introduction

This is the TIBCO log4j SNMP Appender for AciveSpaces Transactions (AST).

This log4j appender will map log4j messages to a network management console via SNMP traps. The log4j configuration file, log4j.properties, is used to determine what log messages are mapped to SNMP traps and also the SNMP configuration parameters.

Version 1 and Version 2c traps are supported.

Please see the enclosed javadoc.

Configuration

The following log4j options are available :-

Attribute Description
ManagementHost Dotted-decimal IP address of the remote host that trap will be sent to. Default is 127.0.0.1
ManagementHostTrapListenPort Port used on the remote host to listen for SNMP traps. Default is 162
EnterpriseOID Enterprise OID that will be sent in the SNMP PDU. Default is 1.3.6.1.2.1.2.0
ApplicationTrapOID Trap OID that will be sent in the SNMP PDU for this application. Default is 1.3.6.1.2.1.2.0.0.0.0
CommunityString Community string for the SNMP session. Default is public.
TrapVersion Trap version 1 or 2. Default is 2.
SystemDescription System description. Default is TIBCO AST.

An example log4j properties file is show below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# $Id: log4j.properties 14425 2014-03-30 06:49:12Z mmanduch $
#
# Copyright 2011 TIBCO Software Inc. All rights reserved.
#
# Simple log4j configuration for test cases
 
log4j.rootLogger=INFO, CONSOLE, TRAP_LOG
 
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
 
# SNMP traps
log4j.appender.TRAP_LOG=com.tibco.snmpappender.SNMPTrapAppender
log4j.appender.TRAP_LOG.SystemDescription=TIBCO AST NAI-NG
log4j.appender.TRAP_LOG.ManagementHost=localhost
log4j.appender.TRAP_LOG.ManagementHostTrapListenPort=162
log4j.appender.TRAP_LOG.EnterpriseOID=1.3.6.1.4.1.24.0
log4j.appender.TRAP_LOG.ApplicationTrapOID=1.3.6.1.4.1.24.12.10.22.64
log4j.appender.TRAP_LOG.CommunityString=public
log4j.appender.TRAP_LOG.Threshold=INFO
log4j.appender.TRAP_LOG.TrapVersion=2
log4j.appender.TRAP_LOG.layout=com.tibco.snmpappender.SnmpDelimitedConversionPatternLayout
log4j.appender.TRAP_LOG.layout.ConversionPattern=%X{alarmNumber};1.3.6.1.4.1.3004.4.2.2.1.1/%X{datetime};1.3.6.1.4.1.3004.4.2.2.1.2/%X{alarmId};1.3.6.1.4.1.3004.4.2.2.1.3/%X{nodename};1.3.6.1.4.1.3004.4.2.2.1.4/%c;1.3.6.1.4.1.3004.4.2.2.1.5/%X{endpoint};1.3.6.1.4.1.3004.4.2.2.1.6/%X{severity};1.3.6.1.4.1.3004.4.2.2.1.7/%m;1.3.6.1.4.1.3004.4.2.2.1.8