Class OsCommandExtension
java.lang.Object
org.sentrysoftware.metricshub.extension.oscommand.OsCommandExtension
- All Implemented Interfaces:
IProtocolExtension
Provides an extension to handle SSH and OS command-based protocols for device monitoring. This extension
supports configuration validation, source and criterion processing, and protocol health checks.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildConfiguration(String configurationType, com.fasterxml.jackson.databind.JsonNode jsonNode, UnaryOperator<char[]> decrypt) checkProtocol(TelemetryManager telemetryManager) booleanisSupportedConfigurationType(String configurationType) booleanisValidConfiguration(IConfiguration configuration) static com.fasterxml.jackson.databind.json.JsonMapperCreates and configures a new instance of the Jackson ObjectMapper for handling YAML data.processCriterion(Criterion criterion, String connectorId, TelemetryManager telemetryManager) processSource(Source source, String connectorId, TelemetryManager telemetryManager)
-
Field Details
-
UP
Protocol up status value '1.0' -
DOWN
Protocol down status value '0.0' -
SSH_TEST_COMMAND
SSH test command to execute- See Also:
-
-
Constructor Details
-
OsCommandExtension
public OsCommandExtension()
-
-
Method Details
-
isValidConfiguration
- Specified by:
isValidConfigurationin interfaceIProtocolExtension
-
getSupportedSources
- Specified by:
getSupportedSourcesin interfaceIProtocolExtension
-
getConfigurationToSourceMapping
public Map<Class<? extends IConfiguration>,Set<Class<? extends Source>>> getConfigurationToSourceMapping()- Specified by:
getConfigurationToSourceMappingin interfaceIProtocolExtension
-
getSupportedCriteria
- Specified by:
getSupportedCriteriain interfaceIProtocolExtension
-
checkProtocol
- Specified by:
checkProtocolin interfaceIProtocolExtension
-
processSource
public SourceTable processSource(Source source, String connectorId, TelemetryManager telemetryManager) - Specified by:
processSourcein interfaceIProtocolExtension
-
processCriterion
public CriterionTestResult processCriterion(Criterion criterion, String connectorId, TelemetryManager telemetryManager) - Specified by:
processCriterionin interfaceIProtocolExtension
-
isSupportedConfigurationType
- Specified by:
isSupportedConfigurationTypein interfaceIProtocolExtension
-
buildConfiguration
public IConfiguration buildConfiguration(String configurationType, com.fasterxml.jackson.databind.JsonNode jsonNode, UnaryOperator<char[]> decrypt) throws InvalidConfigurationException - Specified by:
buildConfigurationin interfaceIProtocolExtension- Throws:
InvalidConfigurationException
-
newObjectMapper
public static com.fasterxml.jackson.databind.json.JsonMapper newObjectMapper()Creates and configures a new instance of the Jackson ObjectMapper for handling YAML data.- Returns:
- A configured ObjectMapper instance.
-
getIdentifier
- Specified by:
getIdentifierin interfaceIProtocolExtension
-