Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Service
    • The JS7 - Log Management Service is compliant to RFC5424, aka Syslog Protocol.
    • The Log Management Service is available from JOC Cockpit within the scope of JS7 - Services.
    • The Log Management Service offers restart capabilities: in case of fail-over or switch-over of JOC Cockpit the Log Management Service will become available from the active JOC Cockpit instance.
  • Clients
    • The JS7 products, JOC Cockpit, Controller and Agents can act as clients to the Log Management Service. The products can be configured to report log output to the Log Management Service.
    • In addition, log output of JS7 products is always written to local log files.
    • Users have a choice to enable forwarding of log output per instance of a JS7 product during installation or later on by adjusting the Log4j2 configuration. 

The JS7 Log Management Service becomes available from

Jira
serverSOS JIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJOC-1828


Display feature availability
StartingFromRelease2.7.2

...

Log4j Configuration

By default the Log4j configuration of JS7 products will not make use of the Log Management Service. Instead, users choose for which instances of JS7 products they want to send log output to the Log Management Service.

The following examples explain the Log4j configuration.

Controller

...

Log4j Configuration

The following Log4j2 Log4j configuration is available from the log4j2.xml-example file in the Controller's <controller-data>/config directory:

Code Block
languagexml
titleExample for Controller log4jlog4j2.xml Configuration
linenumberstrue
collapsetrue
<Appenders>
    <Syslog name="RFC5424" format="RFC5424" host="localhost" port="4514"
            protocol="UDP" charset="UTF-8" facility="LOCAL0" newLine="false">
        <PatternLayout pattern="<134>1 %d{ISO8601}{ETC/UTC}Z ${hostName} JS7 Controller {
"host":"${hostName}",
"controllerId":"${ControllerId}",
"thread":"%t",
"level":"%p",
"logger":"%c{1}",
"message":"%enc{%m}{JSON}",
"thrown":"%enc{%throwable{10}}{JSON}"
}"
        />
    </Syslog>
</Appenders>


Explanations:

  • tbd

...

  • <Syslog>: The XML element holds the required configuration. The following attributes are available:
    • name: users a free to choose a name for the Syslog Appender.
    • format: The value RFC5424 is required.
    • host: The hostname or IP address of JOC Cockpit operating the Log Management Service.
    • port: The port to which the  Log Management Service listens.
    • protocol: The value UDP is required.
    • charset: The value UTF-8 is required.
    • facility: The value LOCAL0 is required
    • newLine: The value false is required.
  • <PatternLayout>: The XML element specifies the pattern used to send messages. The pattern must not be changed.

Agent Log4j Configuration

The following Log4j2 Log4j configuration is available from the log4j2.xml-example file in the Agent's <agent-data>/config directory:

Code Block
languagexml
titleExample for Agent log4jlog4j2.xml Configuration
linenumberstrue
collapsetrue
<Appenders>
    <Syslog name="RFC5424" format="RFC5424" host="localhost" port="4514"
            protocol="UDP" charset="UTF-8" facility="LOCAL0" newLine="false">
        <PatternLayout pattern="<134>1 %d{ISO8601}{ETC/UTC}Z ${hostName} JS7 Controller {
"host":"${hostName}",
"controllerId":"${ControllerId}",
"agentId":"...",
"level":"%p",
"logger":"%c{1}",
"message":"%enc{%m}{JSON}",
"thrown":"%enc{%throwable{10}}{JSON}"
}"
        />
    </Syslog>
</Appenders>


Explanations:

  • tbdSimilar to Controller Log4j configuration, see above.

JOC Cockpit

...

Log4j Configuration

The following Log4j2 Log4j configuration is available from the log4j2.xml-example file in the JOC Cockpit's <jetty-base>/resources/joc directory:

Code Block
languagexml
titleExample for Agent log4jJOC Cockpit log4j2.xml Configuration
linenumberstrue
collapsetrue
<Appenders>
    <Syslog name="RFC5424" format="RFC5424" host="localhost" port="4514"
            protocol="UDP" charset="UTF-8" facility="LOCAL0" newLine="false">
        <PatternLayout pattern="<134>1 %d{ISO8601}{ETC/UTC}Z ${hostName} JS7 Controller {
"host":"${hostName}",
"controllerId":"${ControllerId}",
"agentId":"...",
"level":"%p",
"logger":"%c{1}",
"message":"%enc{%m}{JSON}",
"thrown":"%enc{%throwable{10}}{JSON}"
}"
        />
    </Syslog>
</Appenders>


Explanations:

  • tbdSimilar to Controller Log4j configuration, see above.