Class CommandLineSourceProcessor
java.lang.Object
org.sentrysoftware.metricshub.extension.oscommand.CommandLineSourceProcessor
Processes command-line data sources to extract and transform the output into structured
SourceTable format.
This class handles the execution of operating system commands provided through CommandLineSource, applies line and column filtering, and builds a structured table from the results.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocess(CommandLineSource commandLineSource, String connectorId, TelemetryManager telemetryManager) Processes an OS command defined in aCommandLineSource, executes it, and converts the output into a structuredSourceTable.
-
Constructor Details
-
CommandLineSourceProcessor
public CommandLineSourceProcessor()
-
-
Method Details
-
process
public SourceTable process(CommandLineSource commandLineSource, String connectorId, TelemetryManager telemetryManager) Processes an OS command defined in aCommandLineSource, executes it, and converts the output into a structuredSourceTable.- Parameters:
commandLineSource- The command line source configuration containing the command, filtering, and selection settings.connectorId- Identifier for the connector instance processing this source.telemetryManager- Provides access to system and host configurations necessary for command execution.- Returns:
- A
SourceTablecontaining the processed and formatted output of the OS command. Returns an empty table if an error occurs or if the command line is invalid.
-