Class HealthSummaryElasticSearchUtils

java.lang.Object
com.flowable.platform.service.health.HealthSummaryElasticSearchUtils

public final class HealthSummaryElasticSearchUtils extends Object
Utility methods for extracting metrics from raw Elasticsearch aggregation responses used by the health summary.
  • Method Details

    • extractHitCount

      public static long extractHitCount(tools.jackson.databind.JsonNode response)
      Extracts the total hit count from an ES response.
    • extractRootCount

      public static long extractRootCount(tools.jackson.databind.JsonNode response)
      Extracts the root instance count from the root_count filter aggregation. Returns the total hit count if the aggregation is not present.
    • extractUsagePercentByNode

      public static Map<String, Map<String,Integer>> extractUsagePercentByNode(tools.jackson.databind.JsonNode response, boolean isQueue)
      Extracts per-node usage percentages from a by_node grouped ES response.
    • extractSnapshots

      public static Map<String, Map<String, ExecutorNodeSnapshot>> extractSnapshots(tools.jackson.databind.JsonNode response)
      Extracts per-node, per-executor latest snapshots from a by_node grouped ES response with top_hits.
    • extractJobMetricTotals

      public static Map<String, Map<String,Long>> extractJobMetricTotals(tools.jackson.databind.JsonNode response)
      Extracts job metric totals from a raw ES response grouped by type tag and metric name. Returns a nested map: type tag → metric name → total.
    • extractJobMetricTotalsByNode

      public static Map<String, Map<String, Map<String,Long>>> extractJobMetricTotalsByNode(tools.jackson.databind.JsonNode response)
      Extracts per-node job metric totals from a by_node grouped ES response. Returns a nested map: node → type tag → metric name → total.
    • extractAvgDurationMsByNode

      public static Map<String,Double> extractAvgDurationMsByNode(tools.jackson.databind.JsonNode response)
      Extracts per-node weighted-average job execution duration (ms) from a by_node grouped ES response built by the job-execution-time-avg-by-node report. Skips nodes whose aggregation value is null (no completed jobs in the window).
    • getJobMetricTotal

      public static long getJobMetricTotal(Map<String, Map<String,Long>> totals, String typeTag, String metricName)
      Gets the total for a specific type tag and metric name, or 0 if not present.
    • getJobMetricTotalForTypeTag

      public static long getJobMetricTotalForTypeTag(Map<String, Map<String,Long>> totals, String typeTag)
      Gets the sum of all metric totals for a specific type tag, or 0 if not present.