Skip to content

Commit 3f256a9

Browse files
committed
Use root endpoint for APM Server healthcheck
1 parent 38eebc5 commit 3f256a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apm-agent-core/src/main/java/co/elastic/apm/report/ApmServerHealthChecker.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ class ApmServerHealthChecker implements Runnable {
4040
@Override
4141
public void run() {
4242
boolean success;
43-
String message = null;
43+
String message;
4444
HttpURLConnection connection = null;
4545
try {
46-
URL url = new URL(reporterConfiguration.getServerUrls().get(0).toString() + "/healthcheck");
46+
URL url = new URL(reporterConfiguration.getServerUrls().get(0).toString() + "/");
4747
if (logger.isDebugEnabled()) {
4848
logger.debug("Starting healthcheck to {}", url);
4949
}
@@ -81,7 +81,6 @@ public void run() {
8181
} finally {
8282
if (connection != null) {
8383
connection.disconnect();
84-
connection = null;
8584
}
8685
}
8786

0 commit comments

Comments
 (0)