in src/main/java/co/elastic/support/monitoring/MonitoringExportInputs.java [56:99]
public boolean runInteractive(TextIOManager textIOManager) {
runHttpInteractive(textIOManager);
String operation = textIOManager.standardStringReader
.withNumberedPossibleValues("List", "Extract")
.withIgnoreCase()
.read(SystemProperties.lineSeparator + "List monitored clusters available or extract data from a cluster." );
operation = operation.toLowerCase();
if(operation.equals("extract")){
type = textIOManager.textIO.newStringInputReader()
.withInputTrimming(true)
.withDefaultValue("monitoring")
.read(SystemProperties.lineSeparator + "Enter monitoring for ES and Logstash monitoring data, metric for metricbeat system data, or all.");
clusterId = textIOManager.textIO.newStringInputReader()
.withInputTrimming(true)
.withValueChecker((String val, String propname) -> validateCluster(val))
.read(SystemProperties.lineSeparator + "Enter the cluster id to for the cluster you wish to extract.");
cutoffDate = textIOManager.textIO.newStringInputReader()
.withInputTrimming(true)
.withMinLength(0)
.read(SystemProperties.lineSeparator + "Enter the date for the cutoff point of the extraction. Defaults to today's date. Must be in the format yyyy-MM-dd.");
cutoffTime = textIOManager.textIO.newStringInputReader()
.withInputTrimming(true)
.withMinLength(0)
.read(SystemProperties.lineSeparator + "Enter the time for the cutoff point of the extraction. Defaults to the current UTC time. Must be in the 24 hour format HH:mm.");
interval = textIOManager.textIO.newIntInputReader()
.withInputTrimming(true)
.withDefaultValue(interval)
.withValueChecker((Integer val, String propname) -> validateInterval(val))
.read(SystemProperties.lineSeparator + "The number of hours you wish to extract. Whole integer values only. Defaults to 6 hours.");
validateTimeWindow();
}
runOutputDirInteractive(textIOManager);
return true;
}