Search in sources :

Example 6 with NodeAlarmEvent

use of com.alibaba.otter.shared.communication.model.arbitrate.NodeAlarmEvent in project otter by alibaba.

the class AlarmClientService method sendAlarm.

public void sendAlarm(Long currentNid, Long pipelineId, String title, String msg) {
    final NodeAlarmEvent event = new NodeAlarmEvent();
    event.setNid(currentNid);
    event.setTitle(MonitorName.EXCEPTION.name());
    event.setMessage(MessageFormat.format(MESSAGE_FORMAT, title, msg));
    event.setPipelineId(pipelineId);
    arbitrateCommmunicationClient.callManager(event, new Callback<Object>() {

        public void call(Object result) {
            logger.info("##callManager successed! event:[{}]", event.toString());
        }
    });
}
Also used : NodeAlarmEvent(com.alibaba.otter.shared.communication.model.arbitrate.NodeAlarmEvent)

Aggregations

NodeAlarmEvent (com.alibaba.otter.shared.communication.model.arbitrate.NodeAlarmEvent)6 AlarmRule (com.alibaba.otter.shared.common.model.config.alarm.AlarmRule)2 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 BaseOtterTest (com.alibaba.otter.manager.biz.BaseOtterTest)1 Channel (com.alibaba.otter.shared.common.model.config.channel.Channel)1 Pipeline (com.alibaba.otter.shared.common.model.config.pipeline.Pipeline)1 LogRecord (com.alibaba.otter.shared.common.model.config.record.LogRecord)1 Test (org.testng.annotations.Test)1