public class SlackSelfHealingNotifier extends SelfHealingNotifier
Modifier and Type | Field and Description |
---|---|
protected String |
_slackChannel |
protected String |
_slackIcon |
protected String |
_slackUser |
protected String |
_slackWebhook |
static String |
DEFAULT_SLACK_SELF_HEALING_NOTIFIER_ICON |
static String |
DEFAULT_SLACK_SELF_HEALING_NOTIFIER_USER |
static String |
SLACK_SELF_HEALING_NOTIFIER_CHANNEL |
static String |
SLACK_SELF_HEALING_NOTIFIER_ICON |
static String |
SLACK_SELF_HEALING_NOTIFIER_USER |
static String |
SLACK_SELF_HEALING_NOTIFIER_WEBHOOK |
_brokerFailureAlertThresholdMs, _notifierStartTimeMs, _selfHealingEnabled, _selfHealingEnabledHistoricalDurationMs, _selfHealingStateChangeTimeMs, _selfHealingThresholdMs, _time
Constructor and Description |
---|
SlackSelfHealingNotifier() |
SlackSelfHealingNotifier(org.apache.kafka.common.utils.Time time) |
Modifier and Type | Method and Description |
---|---|
void |
alert(Object anomaly,
boolean autoFixTriggered,
long selfHealingStartTime,
AnomalyType anomalyType)
Alert on anomaly.
|
void |
configure(Map<String,?> config)
Configure this class with the given key-value pairs
|
protected void |
sendSlackMessage(SlackMessage slackMessage,
String slackWebhookUrl) |
onBrokerFailure, onGoalViolation, selfHealingEnabled, selfHealingEnabledRatio, setSelfHealingFor, uptimeMs
public static final String SLACK_SELF_HEALING_NOTIFIER_WEBHOOK
public static final String SLACK_SELF_HEALING_NOTIFIER_ICON
public static final String SLACK_SELF_HEALING_NOTIFIER_USER
public static final String SLACK_SELF_HEALING_NOTIFIER_CHANNEL
public static final String DEFAULT_SLACK_SELF_HEALING_NOTIFIER_ICON
public static final String DEFAULT_SLACK_SELF_HEALING_NOTIFIER_USER
protected String _slackWebhook
protected String _slackIcon
protected String _slackChannel
protected String _slackUser
public SlackSelfHealingNotifier()
public SlackSelfHealingNotifier(org.apache.kafka.common.utils.Time time)
public void configure(Map<String,?> config)
CruiseControlConfigurable
configure
in interface CruiseControlConfigurable
configure
in class SelfHealingNotifier
public void alert(Object anomaly, boolean autoFixTriggered, long selfHealingStartTime, AnomalyType anomalyType)
SelfHealingNotifier
alert
in class SelfHealingNotifier
anomaly
- Detected anomaly.autoFixTriggered
- True if auto fix has been triggered, false otherwise.selfHealingStartTime
- The time that the self healing started.anomalyType
- Type of anomaly.protected void sendSlackMessage(SlackMessage slackMessage, String slackWebhookUrl) throws IOException
IOException