Skip to content

Commit a55e158

Browse files
committed
#57 Fixed missing type from bulk requests
1 parent 6035ee1 commit a55e158

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/io/github/delirius325/jmeter/backendlistener/elasticsearch/ElasticSearchMetricSender.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ public void createIndex() throws IOException {
101101
* sent through the low-level ElasticSearch REST Client.
102102
*/
103103
public void sendRequest() {
104-
Request request = new Request("POST", "/" + this.esIndex + "/_bulk");
104+
Request request = new Request("POST", "/" + this.esIndex + "/SampleResult/_bulk");
105105
StringBuilder bulkRequestBody = new StringBuilder();
106-
String actionMetaData = String.format(SEND_BULK_REQUEST, this.esIndex);
106+
String actionMetaData = String.format(SEND_BULK_REQUEST, this.esIndex, "SampleResult");
107107

108108
for (String metric : this.metricList) {
109109
bulkRequestBody.append(actionMetaData);
@@ -122,7 +122,7 @@ public void sendRequest() {
122122
}
123123
} catch (Exception e) {
124124
if (logger.isErrorEnabled()) {
125-
logger.error("Exception" + e);
125+
logger.error("Exception: " + e);
126126
logger.error("ElasticSearch Backend Listener was unable to perform request to the ElasticSearch engine. Check your JMeter console for more info.");
127127
}
128128
}

0 commit comments

Comments
 (0)