Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Add _cat/ml/anomaly_detectors API #51364

Merged
merged 2 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -255,6 +255,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 @@ -765,7 +766,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