code: public List<String> extractMetricNames() {
  
          List<String> result = new ArrayList<>();
          for (MonitoringRule rule : monitoringRules.getMonitoringRules()) {
              for (Action action : rule.getActions().getActions()) {
                  if (action.getName().equalsIgnoreCase("OutputMetric")) {
                      for (Parameter parameter : action.getParameters()) {
                          if (parameter.getName().equalsIgnoreCase("metric")) {
                              result.add(parameter.getValue());
                          }
                      }
                  }
              }
          }
          return result;
      }
docs: Helper method to extract metric names from Monitoring Rules