Class HealthSummaryService
java.lang.Object
com.flowable.platform.service.health.HealthSummaryService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<HealthAdvisor> protected final CoreAppManagementServiceprotected final org.flowable.cmmn.api.CmmnHistoryServiceprotected final org.flowable.engine.HistoryServiceprotected final org.flowable.engine.ManagementServiceprotected final PlatformEngineConfigurationprotected final CoreReportingServiceprotected final FlowableSystemInformationService -
Constructor Summary
ConstructorsConstructorDescriptionHealthSummaryService(FlowableSystemInformationService systemInformationService, CoreReportingService reportingService, PlatformEngineConfiguration platformEngineConfiguration, CoreAppManagementService appManagementService, org.flowable.engine.HistoryService historyService, org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService, org.flowable.engine.ManagementService managementService) HealthSummaryService(FlowableSystemInformationService systemInformationService, CoreReportingService reportingService, PlatformEngineConfiguration platformEngineConfiguration, CoreAppManagementService appManagementService, org.flowable.engine.HistoryService historyService, org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService, org.flowable.engine.ManagementService managementService, List<HealthAdvisor> advisors) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<HealthAdviceItem> computeAdvice(HealthSummaryResponse response, List<SystemInformation> systemInfo, String tenantId) protected ExecutorMetricsComputes executor metrics using ES (primary) with DB fallback, consistent withcomputeMetrics(Date, Date, String).protected ExecutorMetricscomputeExecutorMetricsFromDb(Instant to, Instant from10m, Instant from1h) protected voidcomputeJobMetricsFromDb(HealthSummaryResponse.HealthSummaryMetrics metrics, Date from, Date to, String tenantId) computeMetrics(Date from, Date to, String tenantId) protected Map<String, HealthSummaryResponse.NodeJobThroughput> computeNodeJobThroughput(int minutesAgo, String tenantId) protected Map<String, HealthSummaryResponse.NodeJobThroughput> computeNodeJobThroughputFromEs(int minutesAgo, Date from, Date to, String tenantId) Computes per-node job throughput from ES.protected List<SlowJobIncidentCount> computeSlowJobIncidentCounts(int minutesAgo, String tenantId) protected Map<String, Map<String, ExecutorNodeSnapshot>> dbLatestExecutorSnapshotsByNode(Instant from, Instant to) protected ExecutorMetricsfetchExecutorMetricsFromEs(Instant to, Instant from10m, Instant from1h) getHealthSummary(int minutesAgo, Integer comparisonMinutesAgo, String tenantId) protected booleanReturns true if Micrometer metrics are being exported to Elasticsearch, meaning ES-backed metric reports can be used.protected Map<String, Map<String, HealthSummaryResponse.NodeExecutorMetrics>> mergeNodeExecutorMetrics(Map<String, Map<String, ExecutorNodeSnapshot>> currentSnapshots, Map<String, Map<String, Integer>> threadByNode10m, Map<String, Map<String, Integer>> threadByNode1h, Map<String, Map<String, Integer>> queueByNode10m, Map<String, Map<String, Integer>> queueByNode1h) protected tools.jackson.databind.JsonNoderunRawReport(String reportId, Instant from, Instant to) protected tools.jackson.databind.JsonNoderunRawReport(String reportId, Instant from, Instant to, String tenantId) protected voidscaleStartedCountsToWindow(HealthSummaryResponse.HealthSummaryMetrics metrics, double factor)
-
Field Details
-
systemInformationService
-
reportingService
-
platformEngineConfiguration
-
appManagementService
-
historyService
protected final org.flowable.engine.HistoryService historyService -
cmmnHistoryService
protected final org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService -
managementService
protected final org.flowable.engine.ManagementService managementService -
advisors
-
-
Constructor Details
-
HealthSummaryService
public HealthSummaryService(FlowableSystemInformationService systemInformationService, CoreReportingService reportingService, PlatformEngineConfiguration platformEngineConfiguration, CoreAppManagementService appManagementService, org.flowable.engine.HistoryService historyService, org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService, org.flowable.engine.ManagementService managementService) -
HealthSummaryService
public HealthSummaryService(FlowableSystemInformationService systemInformationService, CoreReportingService reportingService, PlatformEngineConfiguration platformEngineConfiguration, CoreAppManagementService appManagementService, org.flowable.engine.HistoryService historyService, org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService, org.flowable.engine.ManagementService managementService, List<HealthAdvisor> advisors)
-
-
Method Details
-
getHealthSummary
public HealthSummaryResponse getHealthSummary(int minutesAgo, Integer comparisonMinutesAgo, String tenantId) -
computeAdvice
protected List<HealthAdviceItem> computeAdvice(HealthSummaryResponse response, List<SystemInformation> systemInfo, String tenantId) -
computeMetrics
protected HealthSummaryResponse.HealthSummaryMetrics computeMetrics(Date from, Date to, String tenantId) -
scaleStartedCountsToWindow
protected void scaleStartedCountsToWindow(HealthSummaryResponse.HealthSummaryMetrics metrics, double factor) -
isElasticSearchMetricsAvailable
protected boolean isElasticSearchMetricsAvailable()Returns true if Micrometer metrics are being exported to Elasticsearch, meaning ES-backed metric reports can be used. -
computeExecutorMetrics
Computes executor metrics using ES (primary) with DB fallback, consistent withcomputeMetrics(Date, Date, String). -
fetchExecutorMetricsFromEs
-
runRawReport
-
runRawReport
-
computeExecutorMetricsFromDb
-
dbLatestExecutorSnapshotsByNode
-
mergeNodeExecutorMetrics
protected Map<String, Map<String, HealthSummaryResponse.NodeExecutorMetrics>> mergeNodeExecutorMetrics(Map<String, Map<String, ExecutorNodeSnapshot>> currentSnapshots, Map<String, Map<String, Integer>> threadByNode10m, Map<String, Map<String, Integer>> threadByNode1h, Map<String, Map<String, Integer>> queueByNode10m, Map<String, Map<String, Integer>> queueByNode1h) -
computeJobMetricsFromDb
protected void computeJobMetricsFromDb(HealthSummaryResponse.HealthSummaryMetrics metrics, Date from, Date to, String tenantId) -
computeSlowJobIncidentCounts
-
computeNodeJobThroughput
protected Map<String, HealthSummaryResponse.NodeJobThroughput> computeNodeJobThroughput(int minutesAgo, String tenantId) -
computeNodeJobThroughputFromEs
protected Map<String, HealthSummaryResponse.NodeJobThroughput> computeNodeJobThroughputFromEs(int minutesAgo, Date from, Date to, String tenantId) Computes per-node job throughput from ES. Counts come from thejob-metrics-summary-by-nodereport (counters); avg execution duration comes from thejob-execution-time-avg-by-nodereport (weighted_avg over theflowable_job_executionTimer's mean, weighted by sample count). Returnsnullwhen the counts report did not yield any data (so the caller can fall back to DB).
-