Skip to content

Commit

Permalink
[7.x] [ML] Add _cat/ml/anomaly_detectors API (#51364) (#51408)
Browse files Browse the repository at this point in the history
[ML] Add _cat/ml/anomaly_detectors API (#51364)
  • Loading branch information
benwtrent authored Jan 24, 2020
1 parent a29deec commit bf53ca3
Show file tree
Hide file tree
Showing 6 changed files with 747 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,30 @@ public ForecastStats merge(ForecastStats other) {
return this;
}

public long getTotal() {
return total;
}

public long getForecastedJobs() {
return forecastedJobs;
}

public StatsAccumulator getMemoryStats() {
return memoryStats;
}

public StatsAccumulator getRecordStats() {
return recordStats;
}

public StatsAccumulator getRuntimeStats() {
return runtimeStats;
}

public CountAccumulator getStatusCounts() {
return statusCounts;
}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
import org.elasticsearch.xpack.ml.rest.calendar.RestPostCalendarEventAction;
import org.elasticsearch.xpack.ml.rest.calendar.RestPutCalendarAction;
import org.elasticsearch.xpack.ml.rest.calendar.RestPutCalendarJobAction;
import org.elasticsearch.xpack.ml.rest.cat.RestCatJobsAction;
import org.elasticsearch.xpack.ml.rest.datafeeds.RestDeleteDatafeedAction;
import org.elasticsearch.xpack.ml.rest.datafeeds.RestGetDatafeedStatsAction;
import org.elasticsearch.xpack.ml.rest.datafeeds.RestGetDatafeedsAction;
Expand Down Expand Up @@ -777,7 +778,9 @@ public List<RestHandler> getRestHandlers(Settings settings, RestController restC
new RestGetTrainedModelsAction(restController),
new RestDeleteTrainedModelAction(restController),
new RestGetTrainedModelsStatsAction(restController),
new RestPutTrainedModelAction(restController)
new RestPutTrainedModelAction(restController),
// CAT Handlers
new RestCatJobsAction(restController)
);
}

Expand Down
Loading

0 comments on commit bf53ca3

Please sign in to comment.