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

add update to the es query for stats repo #461

Closed
Closed
Changes from 1 commit
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 @@ -156,7 +156,7 @@ public JsonArray getNumberOfAccounts() throws DataException {
StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append("/").append(AWS).append("/")
.append(SEARCH);
StringBuilder requestBody = new StringBuilder(
"{\"query\":{\"bool\":{}},\"aggs\":{\"accounts\":{\"terms\":{\"field\":\"accountname.keyword\",\"size\":10000}}}}");
"{\"query\":{\"bool\":{}},\"aggs\":{\"accounts\":{\"terms\":{\"field\":\"accountid.keyword\",\"size\":10000}}}}");
String responseDetails = PacHttpUtils.doHttpPost(urlToQueryBuffer.toString(), requestBody.toString());
JsonObject paramObj = parser.parse(responseDetails).getAsJsonObject();
JsonObject aggsJson = (JsonObject) parser.parse(paramObj.get(AGGS).toString());
Expand Down Expand Up @@ -266,4 +266,4 @@ public List<Map<String, Object>> getAutofixActionCountByRule() throws DataExcept
}
}

}
}