Skip to content

Commit 1cd7a67

Browse files
hzhao-githubmriccell
authored andcommitted
Elk fluentd debug
1 parent 60f9f1e commit 1cd7a67

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/LoggingExporter.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ public static Map<String, String> verifyLoggingExporterReady(String opNamespace,
278278
execLoggingExpStatusCheck(opNamespace, esNamespace, labelSelector, "*" + index + "*");
279279
assertNotNull(statusLine);
280280

281+
logger.info("=== statusLine return by execLoggingExpStatusCheck: {0}!", statusLine);
282+
281283
String [] parseString = statusLine.split("\\s+");
282284
assertTrue(parseString.length >= 3, index + " does not exist!");
283285
String healthStatus = parseString[0];
@@ -469,27 +471,33 @@ private static V1Service createKibanaServiceCr(LoggingExporterParams params) {
469471
private static String execLoggingExpStatusCheck(String opNamespace, String esNamespace,
470472
String labelSelector, String indexRegex) {
471473
String elasticSearchHost = "elasticsearch." + esNamespace + ".svc.cluster.local";
474+
logger.info("=== elasticSearchHost in execLoggingExpStatusCheck: {0}", elasticSearchHost);
472475
StringBuffer k8sExecCmdPrefixBuff = new StringBuffer("curl http://");
473476
String cmd = k8sExecCmdPrefixBuff
474477
.append(elasticSearchHost)
475478
.append(":")
476479
.append(ELASTICSEARCH_HTTP_PORT)
477480
.append("/_cat/indices/")
478481
.append(indexRegex).toString();
479-
logger.info("Command to get logging exporter status line {0}", cmd);
482+
logger.info("=== Command to get logging exporter status line {0}", cmd);
480483

481484
// get Operator pod name
482485
String operatorPodName = assertDoesNotThrow(() -> getOperatorPodName(OPERATOR_RELEASE_NAME, opNamespace));
483486
assertTrue(operatorPodName != null && !operatorPodName.isEmpty(), "Failed to get Operator pad name");
487+
logger.info("=== operatorPodName in execLoggingExpStatusCheck: {0}", operatorPodName);
484488

485489
int i = 0;
486490
ExecResult statusLine = null;
487491
while (i < maxIterationsPod) {
492+
logger.info("=== cmd to exec execLoggingExpStatusCheck: opNamespace: {0}, operatorPodName: {1}, cmd {2} {3}",
493+
opNamespace, operatorPodName, "/bin/sh -c ", cmd);
488494
statusLine = assertDoesNotThrow(() -> execCommand(opNamespace, operatorPodName, null, true,
489495
"/bin/sh", "-c", cmd));
490496
assertNotNull(statusLine, "curl command returns null");
491497

492-
logger.info("Status {0} for index {1} ", statusLine.stdout(), indexRegex);
498+
logger.info("Status.stdout(): ###{0}### for index ***{1}***", statusLine.stdout(), indexRegex);
499+
logger.info("Status.stderr(): ###{0}### for index ***{1}***", statusLine.stderr(), indexRegex);
500+
logger.info("Status.toString(): ###{0}### for index ***{1}***", statusLine.toString(), indexRegex);
493501
if (null != statusLine.stdout() && !statusLine.stdout().isEmpty()) {
494502
break;
495503
}

0 commit comments

Comments
 (0)