class WebHookAlertNotifyHandlerImpl extends AbstractAlertNotifyHandlerImpl {

    @Override
    public void send(NoticeReceiver receiver, NoticeTemplate noticeTemplate, Alert alert) {<FILL_FUNCTION_BODY>}

    @Override
    public byte type() {
        return 2;
    }

    private void filterInvalidTags(Alert alert) {
        if (alert.getTags() == null) {
            return;
        }

        Iterator<Map.Entry<String, String>> iterator = alert.getTags().entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry<String, String> entry = iterator.next();
            if (StringUtils.isNoneBlank(entry.getKey(), entry.getValue())) {
                continue;
            }

            iterator.remove();
        }

        // In order to beautify Freemarker template
        if (alert.getTags().entrySet().size() <= 0L) {
            alert.setTags(null);
        }
    }
}

        try {
            HttpHeaders headers = new HttpHeaders();
            headers.setContentType(MediaType.APPLICATION_JSON);

            // fix null pointer exception
            filterInvalidTags(alert);
            String webhookJson = renderContent(noticeTemplate, alert);
            webhookJson = webhookJson.replace(",\n  }", "\n }");

            HttpEntity<String> alertHttpEntity = new HttpEntity<>(webhookJson, headers);
            ResponseEntity<String> entity = restTemplate.postForEntity(receiver.getHookUrl(), alertHttpEntity, String.class);
            if (entity.getStatusCode().value() < HttpStatus.BAD_REQUEST.value()) {
                log.debug("Send WebHook: {} Success", receiver.getHookUrl());
            } else {
                log.warn("Send WebHook: {} Failed: {}", receiver.getHookUrl(), entity.getBody());
                throw new AlertNoticeException("Http StatusCode " + entity.getStatusCode());
            }
        } catch (Exception e) {
            throw new AlertNoticeException("[WebHook Notify Error] " + e.getMessage());
        }
    
<methods>public void onEvent(org.apache.hertzbeat.common.support.event.SystemConfigChangeEvent) <variables>protected static final java.time.format.DateTimeFormatter DTF,private static final java.lang.String NUMBER_FORMAT,protected org.apache.hertzbeat.alert.AlerterProperties alerterProperties,protected java.util.ResourceBundle bundle,protected org.apache.hertzbeat.manager.service.NoticeConfigService noticeConfigService,protected RestTemplate restTemplate