Module org.elasticsearch.xcore
Class AbstractAuditMessage
java.lang.Object
org.elasticsearch.xpack.core.common.notifications.AbstractAuditMessage
- All Implemented Interfaces:
ToXContent,ToXContentObject
- Direct Known Subclasses:
AnomalyDetectionAuditMessage,DataFrameAnalyticsAuditMessage,InferenceAuditMessage,SystemAuditMessage,TransformAuditMessage
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final intThe max length of an audit message in characters is 32766 / 4 = 8191 where 32766 is the limit in bytes Lucene sets for a term field and 4 is the max number of bytes required to represent a UTF8 character.static final ParseFieldstatic final ParseFieldstatic final ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static final <T extends AbstractAuditMessage>
ConstructingObjectParser<T, Void> createParser(String name, AbstractAuditMessageFactory<T> messageFactory, ParseField resourceField) booleanabstract Stringfinal LevelgetLevel()final Stringfinal Stringfinal Stringfinal DateinthashCode()toXContent(XContentBuilder builder, ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
MESSAGE
-
LEVEL
-
TIMESTAMP
-
NODE_NAME
-
JOB_TYPE
-
MAX_AUDIT_MESSAGE_CHARS
public static final int MAX_AUDIT_MESSAGE_CHARSThe max length of an audit message in characters is 32766 / 4 = 8191 where 32766 is the limit in bytes Lucene sets for a term field and 4 is the max number of bytes required to represent a UTF8 character.- See Also:
-
-
Constructor Details
-
AbstractAuditMessage
-
-
Method Details
-
createParser
protected static final <T extends AbstractAuditMessage> ConstructingObjectParser<T,Void> createParser(String name, AbstractAuditMessageFactory<T> messageFactory, ParseField resourceField) -
getResourceId
-
getMessage
-
getLevel
-
getTimestamp
-
getNodeName
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
getJobType
- Returns:
- job type string used to tell apart jobs of different types stored in the same index
-
getResourceField
- Returns:
- resource id field name used when storing a new message
-