Page History
...
- Service
- The JS7 - Log Notification Service is used to collect warnings and errors from log output of Controller , & Agent & JOC Cockpit instances and to create JS7 - Notifications. JOC Cockpit notifications are created directly and without use of the service.
- The service is compliant to RFC5424, aka Syslog Protocol and offers restart capabilities.
- Clients
- Controller , & Agent & JOC Cockpit instances can act as clients to the Log Notification Service. The products can be configured to report warnings and errors to the Log Notification Service.
- Users have a choice to enable forwarding of warnings and errors during installation or later on by adjusting the Log4j configuration.
- User Interface
- The JOC Cockpit offers notifications from the JS7 - Monitor view.
...
By default the Log4j configuration of Controller , & Agent & JOC Cockpit instances will not make use of the Log Notification Service. Instead, users choose for which instances of JS7 products they want to send errors and warnings to the Log Notification Service.
...
The following Log4j configuration example extract is available from the log4j2.xml-example
file in the Controller's <controller-data>/config
directory.
- Users can copy the
log4j2.xml-example
file to a file with the namelog4j2.xml
. Should this file exist, then the<Syslog>
element and related<Properties>
elements from the example file can be copied. - Users have to adjust settings from the
<Properties>
configuration elements. No changes must be applied to the<Syslog>
configuration element.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<Properties> ... <Property name="SysLogLevel">Off</Property> <Property name="SysLogHost">joc-2-0-primary</Property> <Property name="SysLogPort">4245</Property> ... </Properties> <Appenders> ... <Syslog name="LogNotificationAppenderlogNotificationAppender" format="RFC5424" host="joc-2-0-primary${SysLogHost}" port="4245${SysLogPort}" protocol="UDP"> <ThresholdFilter level="WARN"/> <PatternLayout charset="UTF-8" pattern="<134>1 %d{yyyy-MM-dd'T'HH:mm:ss.SSS}{Etc/UTC}Z ${hostName} ControllerAgent { "controllerIdsubagentId":"%X{js7.serverId}", "instanceIdrole":"%X{js7.clusterNodeId}", "level":"%p", "logger":"%c{1}", "message":"%enc{%m}{JSON}", "thrown":"%enc{%throwable{10}}{JSON}"}"/> </Syslog> ... </Appenders> |
Explanations:
<Syslog>
: The XML element holds the required configuration. The following attributes are available:name
: users a free to choose a name forSysLogLevel
: By default theOff
value is used that deactivates the Syslog Appender. A valueWARN
will forward warnings and errors to the Log Notification Service.SysLogHost
format
: The valueRFC5424
is required.port
SysLogPort
: The port to which the Log Notificatio Service listens.protocol
: The valueUDP
is required.<PatternLayout>
: The XML element specifies the pattern used to send messages. The pattern must not be changed.- of the Log Notification Service in JOC Cockpit is required. The default value is
4245
.
host
: The hostname or IP address of the JOC Cockpit operating instance operatiang the Log Notification Service.Agent Log4j Configuration
...
- Users can copy the
log4j2.xml-example
file to a file with the namelog4j2.xml
. Should this file exist, then the<Syslog>
element from and related<Properties>
elements from the example file can be copied. - Users have to adjust settings from the
<Properties>
configuration elements. No changes must be applied to the<Syslog>
configuration element.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<Properties> ... <Property name="SysLogLevel">Off</Property> <Property name="SysLogHost">joc-2-0-primary</Property> <Property name="SysLogPort">4245</Property> ... </Properties> <Appenders> ... <Syslog name="LogNotificationAppender" format="RFC5424" host="joc-2-0-primary" port="4245" protocol="UDP"> <ThresholdFilter level="WARN"/> <PatternLayout charset="UTF-8" pattern="<134>1 %d{yyyy-MM-dd'T'HH:mm:ss.SSS}{Etc/UTC}Z ${hostName} Agent { "instanceId":"%X{js7.serverId}", "role":"%X{js7.clusterNodeId}", "level":"%p", "logger":"%c{1}", "message":"%enc{%m}{JSON}", "thrown":"%enc{%throwable{10}}{JSON}"}"/> </Syslog> ... </Appenders> |
Explanations:
...
Overview
Content Tools