public List<RunningRule> findRunningRule(String metricsName) {
        List<RunningRule> runningRules = new ArrayList<>();
        for (Map.Entry<String, Set<String>> entry : alarmRulesWatcher.getExprMetricsMap().entrySet()) {
            if (entry.getValue().contains(metricsName)) {
                List<RunningRule> found = alarmRulesWatcher.getRunningContext().get(entry.getKey());
                if (found != null) {
                    runningRules.addAll(found);
                }
            }
        }
        return runningRules.size() > 0 ? runningRules : null;
    }
Find the running rules by the metrics name.

@param metricsName to be found
@return the matched running rule list, or null if not found.
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/AlarmCore.java