Package org.graylog2.alerts
Class AbstractAlertCondition
java.lang.Object
org.graylog2.alerts.AbstractAlertCondition
- All Implemented Interfaces:
AlertCondition,EmbeddedPersistable
- Direct Known Subclasses:
DummyAlertCondition,FieldContentValueAlertCondition,FieldValueAlertCondition,LegacyAlertCondition,MessageCountAlertCondition
public abstract class AbstractAlertCondition
extends Object
implements EmbeddedPersistable, AlertCondition
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic enumNested classes/interfaces inherited from interface org.graylog2.plugin.alarms.AlertCondition
AlertCondition.Config, AlertCondition.Descriptor, AlertCondition.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected static final Stringprotected static final Stringprotected final org.joda.time.DateTimeprotected final Stringprotected final intprotected final Stringprotected final booleanprotected final Streamprotected final Stringprotected final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildQueryFilter(String streamId, String query) Combines the given stream ID and query string into a single filter string.org.joda.time.DateTimestatic List<ConfigurationField>intgetGrace()getId()getTitle()getType()protected voidsetParameters(Map<String, Object> parameters) booleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.graylog2.plugin.alarms.AlertCondition
getDescription, runCheck
-
Field Details
-
CK_QUERY
- See Also:
-
CK_QUERY_DEFAULT_VALUE
- See Also:
-
id
-
stream
-
type
-
createdAt
protected final org.joda.time.DateTime createdAt -
creatorUserId
-
grace
protected final int grace -
backlog
protected final int backlog -
repeatNotifications
protected final boolean repeatNotifications -
title
-
-
Constructor Details
-
AbstractAlertCondition
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceAlertCondition
-
getType
- Specified by:
getTypein interfaceAlertCondition
-
getTitle
- Specified by:
getTitlein interfaceAlertCondition
-
getCreatedAt
public org.joda.time.DateTime getCreatedAt()- Specified by:
getCreatedAtin interfaceAlertCondition
-
getCreatorUserId
- Specified by:
getCreatorUserIdin interfaceAlertCondition
-
getStream
- Specified by:
getStreamin interfaceAlertCondition
-
setParameters
-
getParameters
- Specified by:
getParametersin interfaceAlertCondition
-
getBacklog
- Specified by:
getBacklogin interfaceAlertCondition
-
toString
-
getPersistedFields
- Specified by:
getPersistedFieldsin interfaceEmbeddedPersistable
-
getGrace
public int getGrace()- Specified by:
getGracein interfaceAlertCondition
-
shouldRepeatNotifications
public boolean shouldRepeatNotifications()- Specified by:
shouldRepeatNotificationsin interfaceAlertCondition
-
buildQueryFilter
Combines the given stream ID and query string into a single filter string.- Parameters:
streamId- the stream IDquery- the query string (might be null or empty)- Returns:
- the combined filter string
-
getDefaultConfigurationFields
-