Class WmiExtension
java.lang.Object
org.sentrysoftware.metricshub.extension.wmi.WmiExtension
- All Implemented Interfaces:
IProtocolExtension
This class implements the
IProtocolExtension contract, reports the supported features,
processes WMI sources and criteria.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DoubleProtocol down status value '0.0'static final DoubleProtocol up status value '1.0'static final StringWMI namespacestatic final StringWMI Query used by the protocol health checkstatic final StringUp metric name format that will be saved by the metric factory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildConfiguration(@NonNull String configurationType, @NonNull com.fasterxml.jackson.databind.JsonNode jsonNode, UnaryOperator<char[]> decrypt) voidcheckProtocol(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' -
WMI_UP_METRIC
Up metric name format that will be saved by the metric factory- See Also:
-
WMI_TEST_NAMESPACE
WMI namespace- See Also:
-
WMI_TEST_QUERY
WMI Query used by the protocol health check- See Also:
-
-
Constructor Details
-
WmiExtension
public WmiExtension()Creates a new instance of theWmiExtensionimplementation.
-
-
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
-
processCriterion
public CriterionTestResult processCriterion(Criterion criterion, String connectorId, TelemetryManager telemetryManager) - Specified by:
processCriterionin interfaceIProtocolExtension
-
processSource
public SourceTable processSource(Source source, String connectorId, TelemetryManager telemetryManager) - Specified by:
processSourcein interfaceIProtocolExtension
-
isSupportedConfigurationType
- Specified by:
isSupportedConfigurationTypein interfaceIProtocolExtension
-
buildConfiguration
public IConfiguration buildConfiguration(@NonNull @NonNull String configurationType, @NonNull @NonNull 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.
-