public static ObjectNode getAlertsJson(Cluster cluster, int pageNumber) {
    // getting list of all types of alerts
    Cluster.Alert[] alertsList = cluster.getAlertsList();

    // create alerts json
    ObjectNode alertsJsonObject = mapper.createObjectNode();

    if ((alertsList != null) && (alertsList.length > 0)) {
      ArrayNode errorJsonArray = mapper.createArrayNode();
      ArrayNode severeJsonArray = mapper.createArrayNode();
      ArrayNode warningJsonArray = mapper.createArrayNode();
      ArrayNode infoJsonArray = mapper.createArrayNode();

      cluster.setNotificationPageNumber(pageNumber);
      for (Cluster.Alert alert : alertsList) {
        ObjectNode objAlertJson = mapper.createObjectNode();
        objAlertJson.put("description", alert.getDescription());
        objAlertJson.put("memberName", alert.getMemberName());
        objAlertJson.put("severity", alert.getSeverity());
        objAlertJson.put("isAcknowledged", alert.isAcknowledged());
        objAlertJson.put("timestamp", alert.getTimestamp().toString());
        objAlertJson.put("iso8601Ts", alert.getIso8601Ts());
        objAlertJson.put("id", alert.getId());

        if (alert.getSeverity() == Cluster.Alert.SEVERE) {
          severeJsonArray.add(objAlertJson);
        } else if (alert.getSeverity() == Cluster.Alert.ERROR) {
          errorJsonArray.add(objAlertJson);
        } else if (alert.getSeverity() == Cluster.Alert.WARNING) {
          warningJsonArray.add(objAlertJson);
        } else {
          infoJsonArray.add(objAlertJson);
        }
      }
      alertsJsonObject.set("info", infoJsonArray);
      alertsJsonObject.set("warnings", warningJsonArray);
      alertsJsonObject.set("errors", errorJsonArray);
      alertsJsonObject.set("severe", severeJsonArray);
    }
    return alertsJsonObject;
  }
function used for getting all members details in format of JSON Object array defined under a
cluster

@return JSONObject Array list
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/service/SystemAlertsService.java