Log4net
  1. Log4net
  2. LOG4NET-254

[PATCH] Added Snmp V1 Trap Appender

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.2 Maintenance Release
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      independent

      Description

      Added simple Snmp V1 Trap appender.

      Properties are based on configuration XML for log4j. I interpreted ApplicationTrapOID
      from the log4j appender to mean the ObjectOID for the message variable added to the TrapPDU.
      Uptime ticks PDU element based on time appender class is instantiated. Could be extended
      to include options for app pool uptime or time since last boot, etc. 4K character limit
      imposed on message length, extra cares will be truncated.

      Baseline revision: 881070

      New File:
      apache-log4net\src\Appender\SnmpTrapAppender.cs

      Example Config:

      <appender name="SnmpTrapAppender" type="log4net.Appender.SnmpTrapAppender">
      <RemoteAddress value="127.0.0.1" />
      <RemotePort value="162" />
      <EnterpriseOID value="1.3.6.1.X.X.XXX.X.X" />
      <ApplicationTrapOID value="1.3.6.1.X.X.XXX.X.X.X.14" />
      <CommunityString value="public" />
      <GenericTrapType value="EnterpriseSpecific" />
      <SpecificTrapType value="16" />
      <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%message" />
      </layout>
      </appender>

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development