| Modifier and Type | Class and Description |
|---|---|
static class |
Message.MessageIdFunction
Deprecated.
|
static class |
Message.Recording |
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_FULL_MESSAGE |
static String |
FIELD_GL2_ACCOUNTED_MESSAGE_SIZE
Will be set to the accounted message size in bytes.
|
static String |
FIELD_GL2_MESSAGE_ID
This is the message ID.
|
static String |
FIELD_GL2_ORIGINAL_TIMESTAMP
Can be set when a message timestamp gets modified to preserve the original timestamp.
|
static String |
FIELD_GL2_PROCESSING_ERROR
Can be set to indicate a message processing error.
|
static String |
FIELD_GL2_PROCESSING_TIMESTAMP
Will be set to the message processing time after all message processors have been run.
|
static String |
FIELD_GL2_RECEIVE_TIMESTAMP
Will be set to the message receive time at the input.
|
static String |
FIELD_GL2_REMOTE_HOSTNAME
Will be set to the hostname of the source node that sent a message.
|
static String |
FIELD_GL2_REMOTE_IP
Will be set to the IP address of the source node that sent a message.
|
static String |
FIELD_GL2_REMOTE_PORT
Will be set to the socket port of the source node that sent a message.
|
static String |
FIELD_GL2_SOURCE_COLLECTOR
Can be set to the collector ID that sent a message.
|
static String |
FIELD_GL2_SOURCE_COLLECTOR_INPUT
Deprecated.
This was used in the legacy collector/sidecar system and contained the database ID of the collector input.
|
static String |
FIELD_GL2_SOURCE_INPUT
Will be set to the ID of the input that received the message.
|
static String |
FIELD_GL2_SOURCE_NODE
Will be set to the ID of the node that received the message.
|
static String |
FIELD_GL2_SOURCE_RADIO
Deprecated.
This was used with the now removed radio system and contained the ID of a radio node.
TODO: Due to be removed in Graylog 3.x
|
static String |
FIELD_GL2_SOURCE_RADIO_INPUT
Deprecated.
This was used with the now removed radio system and contained the input ID of a radio node.
TODO: Due to be removed in Graylog 3.x
|
static String |
FIELD_ID
The "_id" is used as document ID to address the document in Elasticsearch.
|
static String |
FIELD_LEVEL |
static String |
FIELD_MESSAGE |
static String |
FIELD_SOURCE |
static String |
FIELD_STREAMS |
static String |
FIELD_TIMESTAMP |
static com.google.common.collect.ImmutableSet<String> |
FILTERED_FIELDS |
static com.google.common.base.Function<Message,String> |
ID_FUNCTION
Deprecated.
|
static String |
INTERNAL_FIELD_PREFIX
Graylog is writing internal metadata to messages using this field prefix.
|
static com.google.common.collect.ImmutableSet<String> |
RESERVED_FIELDS |
static com.google.common.collect.ImmutableSet<String> |
RESERVED_SETTABLE_FIELDS |
| Constructor and Description |
|---|
Message(Map<String,Object> fields) |
Message(String message,
String source,
org.joda.time.DateTime timestamp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDoubleFields(Map<String,Double> fields)
Deprecated.
|
void |
addField(String key,
Object value) |
void |
addFields(Map<String,Object> fields) |
void |
addLongFields(Map<String,Long> fields)
Deprecated.
|
void |
addStream(Stream stream)
Assign the given stream to this message.
|
void |
addStreams(Iterable<Stream> newStreams)
Assign all of the streams to this message.
|
void |
addStringFields(Map<String,String> fields)
Deprecated.
|
Object |
getField(String key) |
<T> T |
getFieldAs(Class<T> T,
String key) |
int |
getFieldCount() |
Set<String> |
getFieldNames() |
Map<String,Object> |
getFields() |
Iterable<Map.Entry<String,Object>> |
getFieldsEntries() |
boolean |
getFilterOut() |
String |
getId() |
Set<IndexSet> |
getIndexSets()
Return the index sets for this message based on the assigned streams.
|
InetAddress |
getInetAddress() |
boolean |
getIsSourceInetAddress()
Deprecated.
|
long |
getJournalOffset()
Deprecated.
Use
getMessageQueueId() instead. |
String |
getMessage() |
Object |
getMessageQueueId() |
org.joda.time.DateTime |
getProcessingTime() |
org.joda.time.DateTime |
getReceiveTime() |
long |
getSize() |
String |
getSource() |
String |
getSourceInputId() |
Collection<String> |
getStreamIds() |
Set<Stream> |
getStreams()
Get the streams this message is currently routed to.
|
org.joda.time.DateTime |
getTimestamp() |
String |
getValidationErrors()
Deprecated.
|
boolean |
hasField(String field) |
boolean |
hasRecordings() |
boolean |
isComplete() |
Iterator<Message> |
iterator() |
void |
recordCounter(ServerStatus serverStatus,
String name,
int counter) |
String |
recordingsAsString() |
void |
recordTiming(ServerStatus serverStatus,
String name,
long elapsedNanos) |
void |
removeField(String key) |
boolean |
removeStream(Stream stream)
Remove the stream assignment from this message.
|
void |
setFilterOut(boolean filterOut) |
void |
setJournalOffset(long journalOffset) |
void |
setMessageQueueId(Object messageQueueId) |
void |
setProcessingTime(org.joda.time.DateTime processingTime) |
void |
setReceiveTime(org.joda.time.DateTime receiveTime) |
void |
setSource(String source) |
void |
setSourceInputId(String sourceInputId) |
void |
setStreams(List<Stream> streams)
Deprecated.
|
String |
toDumpString() |
Map<String,Object> |
toElasticSearchObject(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.codahale.metrics.Meter invalidTimestampMeter) |
String |
toString() |
static boolean |
validKey(String key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String FIELD_ID
public static final String FIELD_MESSAGE
public static final String FIELD_FULL_MESSAGE
public static final String FIELD_SOURCE
public static final String FIELD_TIMESTAMP
public static final String FIELD_LEVEL
public static final String FIELD_STREAMS
public static final String INTERNAL_FIELD_PREFIX
public static final String FIELD_GL2_ACCOUNTED_MESSAGE_SIZE
public static final String FIELD_GL2_MESSAGE_ID
ULID during processing.
Attention: This is currently NOT the "_id" field which is used as ID for the document in Elasticsearch!
public static final String FIELD_GL2_ORIGINAL_TIMESTAMP
public static final String FIELD_GL2_PROCESSING_ERROR
public static final String FIELD_GL2_PROCESSING_TIMESTAMP
public static final String FIELD_GL2_RECEIVE_TIMESTAMP
public static final String FIELD_GL2_REMOTE_HOSTNAME
public static final String FIELD_GL2_REMOTE_IP
public static final String FIELD_GL2_REMOTE_PORT
public static final String FIELD_GL2_SOURCE_COLLECTOR
@Deprecated public static final String FIELD_GL2_SOURCE_COLLECTOR_INPUT
public static final String FIELD_GL2_SOURCE_INPUT
public static final String FIELD_GL2_SOURCE_NODE
@Deprecated public static final String FIELD_GL2_SOURCE_RADIO
@Deprecated public static final String FIELD_GL2_SOURCE_RADIO_INPUT
public static final com.google.common.collect.ImmutableSet<String> RESERVED_SETTABLE_FIELDS
public static final com.google.common.collect.ImmutableSet<String> RESERVED_FIELDS
public static final com.google.common.collect.ImmutableSet<String> FILTERED_FIELDS
@Deprecated public static final com.google.common.base.Function<Message,String> ID_FUNCTION
public boolean isComplete()
@Deprecated public String getValidationErrors()
public org.joda.time.DateTime getTimestamp()
getTimestamp in interface Indexablepublic Map<String,Object> toElasticSearchObject(com.fasterxml.jackson.databind.ObjectMapper objectMapper, @Nonnull com.codahale.metrics.Meter invalidTimestampMeter)
toElasticSearchObject in interface Indexablepublic String toDumpString()
public String getMessage()
public String getSource()
public void setSource(String source)
public static boolean validKey(String key)
@Deprecated public void addStringFields(Map<String,String> fields)
@Deprecated public void addLongFields(Map<String,Long> fields)
@Deprecated public void addDoubleFields(Map<String,Double> fields)
public void removeField(String key)
public <T> T getFieldAs(Class<T> T, String key) throws ClassCastException
ClassCastExceptionpublic int getFieldCount()
public boolean hasField(String field)
@Deprecated public void setStreams(List<Stream> streams)
public Set<Stream> getStreams()
public void addStream(Stream stream)
stream - the stream to route this message intopublic void addStreams(Iterable<Stream> newStreams)
newStreams - an iterable of Stream objectspublic boolean removeStream(Stream stream)
stream - the stream assignment to remove this message frompublic Set<IndexSet> getIndexSets()
public Collection<String> getStreamIds()
public void setFilterOut(boolean filterOut)
public boolean getFilterOut()
public void setSourceInputId(String sourceInputId)
public String getSourceInputId()
@Deprecated public boolean getIsSourceInetAddress()
public InetAddress getInetAddress()
public void setJournalOffset(long journalOffset)
@Deprecated public long getJournalOffset()
getMessageQueueId() instead.public void setMessageQueueId(Object messageQueueId)
@Nullable public org.joda.time.DateTime getReceiveTime()
getReceiveTime in interface Indexablepublic void setReceiveTime(org.joda.time.DateTime receiveTime)
@Nullable public org.joda.time.DateTime getProcessingTime()
public void setProcessingTime(org.joda.time.DateTime processingTime)
public void recordTiming(ServerStatus serverStatus, String name, long elapsedNanos)
public void recordCounter(ServerStatus serverStatus, String name, int counter)
public String recordingsAsString()
public boolean hasRecordings()
Copyright © 2012–2021 Graylog, Inc.. All rights reserved.