public Rules readRules() {
        Rules rules = new Rules();

        if (Objects.nonNull(yamlData)) {
            // Should read hooks config first.
            readHooksConfig(rules);
            readRulesConfig(rules);
        }
        return rules;
    }
Read rule config file to {@link Rules}
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RulesReader.java