Class SourceUpdaterProcessor
java.lang.Object
org.sentrysoftware.metricshub.engine.strategy.source.SourceUpdaterProcessor
- All Implemented Interfaces:
ISourceProcessor
The
SourceUpdaterProcessor class is responsible for processing various source types, including HTTP, IPMI,
OS command, SNMP, static, table join, table union, WMI, and SNMP table sources. It performs operations such as
replacing attribute references, updating source references, and extracting HTTP authentication tokens.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractHttpTokenFromSource(String originalSourceKey, String foreignSourceKey, String fieldLabel) Extracts the HTTP authentication token from the specified foreign source identified by foreignSourceKey.process(CommandLineSource commandLineSource) Process the CommandLineSource and return a SourceTable.process(CopySource copySource) Process the CopySource and return a SourceTable.process(HttpSource httpSource) Process the HttpSource and return a SourceTable.process(IpmiSource ipmiSource) Process the IpmiSource and return a SourceTable.process(SnmpGetSource snmpGetSource) Process the SnmpGetSource and return a SourceTable.process(SnmpTableSource snmpTableSource) Process the SnmpTableSource and return a SourceTable.Process theSqlSourceand return a SourceTable.process(StaticSource staticSource) Process the StaticSource and return a SourceTable.process(TableJoinSource tableJoinSource) Process the TableJoinSource and return a SourceTable.process(TableUnionSource tableUnionSource) Process the TableUnionSource and return a SourceTable.process(WbemSource wbemSource) Process the WbemSource and return a SourceTable.This method processesWmiSourcesourcestatic StringreplaceAttributeReferences(String key, Map<String, String> attributes) Replace the attribute identifiers referenced in the key with the attribute values that need to be retrieved from the given attributes lookup.static StringreplaceSourceReferenceContent(String value, TelemetryManager telemetryManager, String connectorId, String operationType, Object operationKey) Replace source reference content in the given valuestatic String
-
Constructor Details
-
SourceUpdaterProcessor
public SourceUpdaterProcessor()
-
-
Method Details
-
process
Description copied from interface:ISourceProcessorProcess the HttpSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
httpSource- The HttpSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the CopySource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
copySource- The CopySource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the IpmiSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
ipmiSource- The IpmiSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the CommandLineSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
commandLineSource- The CommandLineSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the SnmpGetSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
snmpGetSource- The SnmpGetSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the SnmpTableSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
snmpTableSource- The SnmpTableSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the StaticSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
staticSource- The StaticSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the TableJoinSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
tableJoinSource- The TableJoinSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the TableUnionSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
tableUnionSource- The TableUnionSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess the WbemSource and return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
wbemSource- The WbemSource to process.- Returns:
- The SourceTable result.
-
process
Description copied from interface:ISourceProcessorProcess theSqlSourceand return a SourceTable.- Specified by:
processin interfaceISourceProcessor- Parameters:
sqlSource- TheSqlSourceto process.- Returns:
- The SourceTable result.
-
process
This method processesWmiSourcesource- Specified by:
processin interfaceISourceProcessor- Parameters:
wmiSource-WmiSourceinstance- Returns:
SourceTableinstance
-
extractHttpTokenFromSource
public String extractHttpTokenFromSource(String originalSourceKey, String foreignSourceKey, String fieldLabel) Extracts the HTTP authentication token from the specified foreign source identified by foreignSourceKey.- Parameters:
originalSourceKey- The original source key for debugging purposes.foreignSourceKey- The foreign source key used to extract the token.fieldLabel- The field label for debugging purposes.- Returns:
- The extracted HTTP authentication token.
-
replaceAttributeReferences
Replace the attribute identifiers referenced in the key with the attribute values that need to be retrieved from the given attributes lookup.- Parameters:
key- The key where to replace the deviceId.attributes- Key-value pairs of the monitor's attributes- Returns:
- String value
-
replaceSourceReferenceContent
public static String replaceSourceReferenceContent(String value, TelemetryManager telemetryManager, String connectorId, String operationType, Object operationKey) Replace source reference content in the given value- Parameters:
value- The value containing source key such as ${source::monitors.cpu.discovery.sources.source1}telemetryManager- The currentTelemetryManagerinstance wrapping the host configuration and the host monitoring instanceconnectorId- The connector's identifieroperationType- The type of the operation required for debug purpose. E.g. Substring, SnmpGetTableSource, ...operationKey- The unique key of the operation used required for debug purpose- Returns:
Stringvalue
-
rowToCsv
- Parameters:
row- The row result we wish to parseseparator- The cells separator on each line- Returns:
Stringvalue
-