Class SyslogAuditEventHandlerConfiguration
- java.lang.Object
-
- org.forgerock.audit.events.handlers.EventHandlerConfiguration
-
- org.forgerock.audit.handlers.syslog.SyslogAuditEventHandlerConfiguration
-
public class SyslogAuditEventHandlerConfiguration extends EventHandlerConfiguration
Configuration object for theSyslogAuditEventHandler
.This configuration object can be created from JSON. Example of valid JSON configuration:
{ "protocol" : "TCP", "host" : "https://forgerock.example.com", "port" : 6514, "connectTimeout" : 30000, "facility" : "local0", "severityFieldMappings": [{ "topic" : "system-status", "field" : "level", "valueMappings" : { "SEVERE" : "EMERGENCY", "WARNING" : "WARNING", "INFO" : "INFORMATIONAL" }, "buffering" : { "enabled" : "true" } }] }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration
Configuration of event buffering.static class
SyslogAuditEventHandlerConfiguration.SeverityFieldMapping
Encapsulates configuration for mapping audit event field values to Syslog severity values.
-
Field Summary
Fields Modifier and Type Field Description protected SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration
buffering
Event buffering is disabled by default.
-
Constructor Summary
Constructors Constructor Description SyslogAuditEventHandlerConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration
getBuffering()
Returns the configuration for events buffering.int
getConnectTimeout()
Returns the timeout after which attempts to connect to the Syslog daemon will be abandoned.Facility
getFacility()
Returns the facility constant that should be applied to all Syslog messages.String
getHost()
Returns the hostname of the Syslog daemon to which messages should be published.int
getPort()
Returns the port of the Syslog daemon to which messages should be published.TransportProtocol
getProtocol()
Returns the protocol over which messages transmitted to the Syslog daemon.List<SyslogAuditEventHandlerConfiguration.SeverityFieldMapping>
getSeverityFieldMappings()
Returns the configurations for mapping audit event field values to Syslog severity values.boolean
isUsableForQueries()
States if anAuditEventHandler
can be used for queries.void
setBufferingConfiguration(SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration bufferingConfiguration)
Sets the configuration for events buffering.void
setConnectTimeout(int connectTimeout)
Sets the timeout after which attempts to connect to the Syslog daemon will be abandoned.void
setFacility(Facility facility)
Sets the facility constant that should be applied to all Syslog messages.void
setHost(String host)
Sets the hostname of the Syslog daemon to which messages should be published.void
setPort(int port)
Sets the port of the Syslog daemon to which messages should be published.void
setProtocol(TransportProtocol protocol)
Sets the protocol over which messages transmitted to the Syslog daemon.void
setSeverityFieldMappings(List<SyslogAuditEventHandlerConfiguration.SeverityFieldMapping> severityFieldMappings)
Sets the configurations for mapping audit event field values to Syslog severity values.-
Methods inherited from class org.forgerock.audit.events.handlers.EventHandlerConfiguration
getName, getTopics, isEnabled, setEnabled, setName, setTopics
-
-
-
-
Field Detail
-
buffering
@JsonPropertyDescription("audit.handlers.syslog.buffering") protected SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration buffering
Event buffering is disabled by default.
-
-
Method Detail
-
getProtocol
public TransportProtocol getProtocol()
Returns the protocol over which messages transmitted to the Syslog daemon.- Returns:
- the transport protocol.
-
setProtocol
public void setProtocol(TransportProtocol protocol)
Sets the protocol over which messages transmitted to the Syslog daemon.- Parameters:
protocol
- the transport protocol.
-
getHost
public String getHost()
Returns the hostname of the Syslog daemon to which messages should be published.- Returns:
- the hostname.
-
setHost
public void setHost(String host)
Sets the hostname of the Syslog daemon to which messages should be published.- Parameters:
host
- the hostname.
-
getPort
public int getPort()
Returns the port of the Syslog daemon to which messages should be published.- Returns:
- the port.
-
setPort
public void setPort(int port)
Sets the port of the Syslog daemon to which messages should be published.- Parameters:
port
- the port.
-
getConnectTimeout
public int getConnectTimeout()
Returns the timeout after which attempts to connect to the Syslog daemon will be abandoned.Only applies when
TransportProtocol.TCP
is active.- Returns:
- the connect timeout.
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout)
Sets the timeout after which attempts to connect to the Syslog daemon will be abandoned.Only applies when
TransportProtocol.TCP
is active.- Parameters:
connectTimeout
- the connect timeout.
-
getFacility
public Facility getFacility()
Returns the facility constant that should be applied to all Syslog messages.- Returns:
- the facility.
- See Also:
- RFC-5424 section 6.2.1
-
setFacility
public void setFacility(Facility facility)
Sets the facility constant that should be applied to all Syslog messages.- Parameters:
facility
- the facility.- See Also:
- RFC-5424 section 6.2.1
-
getSeverityFieldMappings
public List<SyslogAuditEventHandlerConfiguration.SeverityFieldMapping> getSeverityFieldMappings()
Returns the configurations for mapping audit event field values to Syslog severity values.- Returns:
- the severity field mappings.
-
setSeverityFieldMappings
public void setSeverityFieldMappings(List<SyslogAuditEventHandlerConfiguration.SeverityFieldMapping> severityFieldMappings)
Sets the configurations for mapping audit event field values to Syslog severity values.- Parameters:
severityFieldMappings
- the severity field mappings.
-
getBuffering
public SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration getBuffering()
Returns the configuration for events buffering.- Returns:
- the configuration
-
setBufferingConfiguration
public void setBufferingConfiguration(SyslogAuditEventHandlerConfiguration.EventBufferingConfiguration bufferingConfiguration)
Sets the configuration for events buffering.- Parameters:
bufferingConfiguration
- The configuration
-
isUsableForQueries
public boolean isUsableForQueries()
Description copied from class:EventHandlerConfiguration
States if anAuditEventHandler
can be used for queries.- Specified by:
isUsableForQueries
in classEventHandlerConfiguration
- Returns:
- True - If the
AuditEventHandler
can be used for queries. False - If theAuditEventHandler
can not be used for queries.
-
-