public class Alert extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ALERT_STREAM |
private String |
alertname |
private long |
clearTimestamp |
private String |
correlationId |
private String |
currentValue |
private String |
description |
private String |
eventType |
private long |
firstTimestamp |
private String |
info |
private String |
instance |
private long |
lastTimestamp |
private String |
priority |
private String |
probableCause |
private String |
ruleExpression |
private String |
ruleTimeLimit |
private String |
severity |
private String |
source |
private String |
status |
private String |
tags |
private long |
timestamp |
private String |
uid |
private String |
url |
| Constructor and Description |
|---|
Alert() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlertname()
Returns the name of the alert.
|
long |
getClearTimestamp()
Returns the timestamp when the alert was cleared.
|
String |
getCorrelationId()
Returns the correlation ID identifying the same type of events.
|
String |
getCurrentValue()
Returns the current (metric) value causing the alert.
|
String |
getDescription()
Returns an additional description of notification.
|
String |
getEventType()
Returns the event type according to ITU X.733.
|
long |
getFirstTimestamp()
Returns the timestamp of the first occurrence.
|
String |
getInfo()
Returns information about the alert.
|
String |
getInstance()
Returns source (id, IP) who caused/sent the notification.
|
long |
getLastTimestamp()
Returns the timestamp of the last occurrence.
|
String |
getPriority()
Returns the urgency of the notification.
|
String |
getProbableCause()
Returns the probable cause according to ITU X.733.
|
String |
getRuleExpression()
Returns a rule that caused this notification.
|
String |
getRuleTimeLimit()
Returns a time limit set on the rule.
|
String |
getSeverity()
Returns the severity of the notification.
|
String |
getSource()
Returns source (id, IP) who caused/sent the notification.
|
String |
getStatus()
Returns the status of the alert: firing or resolved.
|
String |
getTags()
Returns a comma-separated list of custom tags (labels).
|
long |
getTimestamp()
Returns the timestamp of the first occurrence.
|
String |
getUid()
Returns the unique ID of notification.
|
String |
getUrl()
Returns URL of somewhere associated to the alert, e.g.
|
void |
send(TransportConnector conn)
Sends this message to the given connector on
#ALERT STREAM. |
void |
setAlertname(String alertname)
Changes the name of the alert.
|
void |
setClearTimestamp(long clearTimestamp)
Changes the timestamp when the alert was cleared.
|
void |
setCorrelationId(String correlationId)
Defines the correlation ID identifying the same type of events.
|
void |
setCurrentValue(String currentValue)
Returns the current (metric) value causing the alert.
|
void |
setDescription(String description)
Changes the additional description of notification.
|
void |
setEventType(String eventType)
Defines the event type according to ITU X.733.
|
void |
setFirstTimestamp(long firstTimestamp)
Changes the timestamp of the first occurrence.
|
void |
setInfo(String info)
Changes information about the alert.
|
void |
setInstance(String instance)
Changes the instance (id, IP) who caused/sent the notification.
|
void |
setLastTimestamp(long lastTimestamp)
Changes the timestamp of the last occurrence.
|
void |
setPriority(String priority)
Changes the urgency of the notification.
|
void |
setProbableCause(String probableCause)
Defines the probable cause according to ITU X.733.
|
void |
setRuleExpression(String ruleExpression)
Defines a rule that caused this notification.
|
void |
setRuleTimeLimit(String ruleTimeLimit)
Changes the time limit set on the rule.
|
void |
setSeverity(String severity)
Defines the severity of the notification.
|
void |
setSource(String source)
Changes the source (id, IP) who caused/sent the notification.
|
void |
setStatus(String status)
Changes the status of the alert: firing or resolved.
|
void |
setTags(String tags)
Defines a comma-separated list of custom tags (labels).
|
void |
setTimestamp(long timestamp)
Defines the timestamp of the first occurrence.
|
void |
setUid(String uid)
Defines the unique ID of notification.
|
void |
setUrl(String url)
Defines URL of somewhere associated to the alert, e.g.
|
String |
toString() |
public static final String ALERT_STREAM
private String uid
private String correlationId
private long timestamp
private long firstTimestamp
private long lastTimestamp
private long clearTimestamp
private String source
private String alertname
private String info
private String instance
private String severity
private String priority
private String tags
private String description
private String eventType
private String probableCause
private String currentValue
private String url
private String status
private String ruleExpression
private String ruleTimeLimit
public String getUid()
public void setUid(String uid)
uid - the UIDpublic String getCorrelationId()
public void setCorrelationId(String correlationId)
correlationId - the correlation IDpublic long getTimestamp()
public void setTimestamp(long timestamp)
timestamp - timestamppublic long getFirstTimestamp()
public void setFirstTimestamp(long firstTimestamp)
firstTimestamp - the timestamp of the first occurrencepublic long getLastTimestamp()
public void setLastTimestamp(long lastTimestamp)
lastTimestamp - the timestamp of the last occurrencepublic long getClearTimestamp()
public void setClearTimestamp(long clearTimestamp)
clearTimestamp - the timestamppublic String getSource()
public void setSource(String source)
source - the source id/IPpublic String getInfo()
public void setInfo(String info)
info - information, may be null or emptypublic String getAlertname()
public void setAlertname(String alertname)
alertname - the name, may be null or emptypublic String getInstance()
public void setInstance(String instance)
getSource()instance - the instance id/IPpublic String getSeverity()
public void setSeverity(String severity)
severity - the severitypublic String getPriority()
public void setPriority(String priority)
priority - the urgencypublic String getTags()
public void setTags(String tags)
tags - the tagspublic String getDescription()
public void setDescription(String description)
description - the descriptionpublic String getStatus()
public void setStatus(String status)
status - the statuspublic String getEventType()
public void setEventType(String eventType)
eventType - the event typepublic String getProbableCause()
public void setProbableCause(String probableCause)
probableCause - the probable causepublic String getCurrentValue()
public void setCurrentValue(String currentValue)
currentValue - the current valuepublic String getUrl()
public void setUrl(String url)
url - the URLpublic String getRuleExpression()
public void setRuleExpression(String ruleExpression)
ruleExpression - the rule expressionpublic String getRuleTimeLimit()
public void setRuleTimeLimit(String ruleTimeLimit)
ruleTimeLimit - the time limit, may be null or emptypublic void send(TransportConnector conn) throws IOException
#ALERT STREAM. [convenience]conn - the connectorIOException - if sending failsCopyright © 2022. All rights reserved.