From f9680101d1aedfdad54c5a919e6cf7fba4148dd3 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Fri, 8 Dec 2023 19:39:19 +0000 Subject: [PATCH] Fixes --- .../ml/job/process/autodetect/state/ModelSizeStats.java | 1 + .../src/main/java/org/elasticsearch/xpack/ml/MlMetrics.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java index 3812c012e2a3d..297f7c1a65b22 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java @@ -533,6 +533,7 @@ public static class Builder { public Builder(String jobId) { this.jobId = jobId; memoryStatus = MemoryStatus.OK; + assignmentMemoryBasis = AssignmentMemoryBasis.MODEL_MEMORY_LIMIT; categorizationStatus = CategorizationStatus.OK; logTime = new Date(); } diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MlMetrics.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MlMetrics.java index 5daf4426d8b61..07962dc9235ab 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MlMetrics.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MlMetrics.java @@ -178,7 +178,7 @@ private void registerMasterNodeMetrics(MeterRegistry meterRegistry) { ); metrics.add( meterRegistry.registerLongGauge( - "es.ml.anomaly_detectors.starting.count", + "es.ml.datafeeds.starting.count", "Count of datafeeds in the starting state cluster-wide.", "datafeeds", () -> new LongWithAttributes(mlTaskStatusCounts.datafeedStartingCount, isMasterMap) @@ -186,7 +186,7 @@ private void registerMasterNodeMetrics(MeterRegistry meterRegistry) { ); metrics.add( meterRegistry.registerLongGauge( - "es.ml.anomaly_detectors.started.count", + "es.ml.datafeeds.started.count", "Count of datafeeds in the started state cluster-wide.", "datafeeds", () -> new LongWithAttributes(mlTaskStatusCounts.datafeedStartedCount, isMasterMap) @@ -194,7 +194,7 @@ private void registerMasterNodeMetrics(MeterRegistry meterRegistry) { ); metrics.add( meterRegistry.registerLongGauge( - "es.ml.anomaly_detectors.stopping.count", + "es.ml.datafeeds.stopping.count", "Count of datafeeds in the stopping state cluster-wide.", "datafeeds", () -> new LongWithAttributes(mlTaskStatusCounts.datafeedStoppingCount, isMasterMap)