You are viewing the development documentation for the Apereo CAS server. The
functionality presented here is not officially released yet.
This is a work in progress and will be continually updated as development moves forward.
You are most encouraged to test the changes presented.
Fluentd Logging
Fluentd is an open-source data collector for a unified logging layer.
Fluentd allows you to unify data collection and consumption for better use and understanding of data.
CAS log data can be automatically routed to Fluentd. Support is enabled by including the following module in the overlay:
dependencies{/*
The following platform references should be included automatically and are listed here for reference only.
implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
*/implementation"org.apereo.cas:cas-server-support-logging-config-fluentd"}
With the above module, you may then declare a specific appender to communicate with AWS CloudWatch:
<Configurationpackages="io.github.technologize"><Appenders><Fluentdname="fluentd"tag="yourTag"><!--
all fields are optional, fields name will be sent to fulentd as a key in json
Field value/pattern can follow the Pattern as specified in PatternLayout
Refer: https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout
--><Fieldname="application">CAS</Field><Fieldname="someOtherField">Otherfield %X{traceId}</Field><Fieldname="lookupField"pattern="%N"/><!--
all settings are optional, see FluencyBuilderForFluentd; for default values
you can add as may fields as you like (or none at all)
--><FluentdConfigmaxBufferSize="536870912"bufferChunkInitialSize="1048576"bufferChunkRetentionSize="4194304"bufferChunkRetentionTimeMillis="1000"flushAttemptIntervalMillis="600"waitUntilBufferFlushed="10"waitUntilFlusherTerminated="10"senderMaxRetryCount="8"senderBaseRetryIntervalMillis="400"senderMaxRetryIntervalMillis="30000"connectionTimeoutMillis="5000"readTimeoutMillis="5000"ackResponseMode="true"sslEnabled="false"jvmHeapBufferMode="true"fileBackupDir="true"><!--
all Servers are optional, locahost:24224 will be used if none are specified
If multiple servers are specified,
message will be sent to only one of them dependeing on availability
--><Serverhost="localhost"port="24224"/><Serverhost="127.0.0.1"port="24224"/></FluentdConfig></Fluentd></Appenders><Loggers><Loggername="org.apereo"additivity="true"level="trace"><appender-refref="fluentd"/></Logger></Loggers></Configuration>