@SuppressWarnings("unchecked")
    private void readSlackConfig(Map hooks, Rules rules) {
        Map configs = (Map) hooks.get(AlarmHooksType.slack.name());
        if (configs == null) {
            return;
        }
        configs.forEach((k, v) -> {
            Map<String, Object> config = (Map<String, Object>) v;
            SlackSettings settings = new SlackSettings(
                k.toString(), AlarmHooksType.slack, (Boolean) config.getOrDefault("is-default", false));

            Object textTemplate = config.getOrDefault("text-template", "");
            settings.setTextTemplate((String) textTemplate);

            List<String> webhooks = (List<String>) config.get("webhooks");
            if (webhooks != null) {
                settings.getWebhooks().addAll(webhooks);
            }
            rules.getSlackSettingsMap().put(settings.getFormattedName(), settings);
            if (settings.isDefault()) {
                this.defaultHooks.add(settings.getFormattedName());
            }
            this.allHooks.add(settings.getFormattedName());
        });
    }
Read slack hook config into {@link SlackSettings}
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RulesReader.java