in src/main/java/co/elastic/support/diagnostics/commands/KibanaGetDetails.java [85:115]
private void isKibanaRemoteSystem(DiagnosticContext context, List<ProcessProfile> profiles)
throws DiagnosticException {
if (!context.diagnosticInputs.diagType.equals(Constants.kibanaRemote)) {
return;
}
// If Docker containers flag it for no syscalls or logs
String targetOS;
if (context.dockerPresent) {
context.runSystemCalls = false;
// We really don't have any way of really knowing
// what the enclosing platform is. So this may fail...
logger.warn(Constants.CONSOLE,
"Docker detected on remote platform. Linux will be used but if another operating system is present the diagnostic calls may fail.");
targetOS = Constants.linuxPlatform;
} else {
context.targetNode = findTargetNode(profiles);
targetOS = context.targetNode.os;
}
context.resourceCache.addSystemCommand(Constants.systemCommands, new RemoteSystem(
targetOS,
context.diagnosticInputs.remoteUser,
context.diagnosticInputs.remotePassword,
context.diagnosticInputs.host,
context.diagnosticInputs.remotePort,
context.diagnosticInputs.keyfile,
context.diagnosticInputs.keyfilePassword,
context.diagnosticInputs.knownHostsFile,
context.diagnosticInputs.trustRemote,
context.diagnosticInputs.isSudo));
}