public class SlackSelfHealingNotifier extends SelfHealingNotifier
Modifier and Type | Field and Description |
---|---|
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 |
protected String |
slackChannel |
protected String |
slackIcon |
protected String |
slackUser |
protected String |
slackWebhook |
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