@SuppressWarnings("unchecked")
    private void readGrpcConfig(Map hooks, Rules rules) {
        Map configs = (Map) hooks.get(AlarmHooksType.gRPC.name());
        if (configs == null) {
            return;
        }
        configs.forEach((k, v) -> {
            Map config = (Map) v;
            GRPCAlarmSetting setting = new GRPCAlarmSetting(
                k.toString(), AlarmHooksType.gRPC, (Boolean) config.getOrDefault("is-default", false));

            Object targetHost = config.get("target-host");
            if (targetHost != null) {
                setting.setTargetHost((String) targetHost);
            }

            Object targetPort = config.get("target-port");
            if (targetPort != null) {
                setting.setTargetPort((Integer) targetPort);
            }

            rules.getGrpcAlarmSettingMap().put(setting.getFormattedName(), setting);

            if (setting.isDefault()) {
                this.defaultHooks.add(setting.getFormattedName());
            }
            this.allHooks.add(setting.getFormattedName());
        });
    }
Read grpc hook config into {@link GRPCAlarmSetting}
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RulesReader.java