MetricsHub
MetricsHub Community Connectors 1.0.22
-
Home
- Connector Developer Guide Detection 13
Detection by Product Requirements
When to Use
Use productRequirements to gate a connector on the MetricsHub engine version, preventing a connector that relies on newer engine features from being selected on older installations.
Syntax
connector:
detection:
criteria:
- type: productRequirements
engineVersion: 1.0.15
Properties
| Property | Required | Default | Description |
|---|---|---|---|
type |
Yes | None | productRequirements. |
engineVersion |
No | None | MetricsHub engine version required by the connector (numeric segments, e.g. 1.0.15). |
kmVersion |
No | None | Legacy field inherited from PATROL Knowledge Module connectors. It is carried in the model but never evaluated: a criterion with only kmVersion always succeeds. |
Runtime Behavior
- If
engineVersionis absent or blank, the criterion succeeds. - If
engineVersionis present, the criterion succeeds only when the required version is strictly lower than the running engine version (required < running).
Warning
The comparison is strict: engineVersion: 1.0.15 fails on an engine running exactly 1.0.15. Until this changes, set engineVersion to the last version that does not support what you need (i.e. read it as “requires an engine newer than X”), and verify against the engine version you actually target.
Recommended Pattern
- Use
productRequirementsas the first or second criterion (afterdeviceType): it is free to evaluate. - Keep version requirements minimal and justified — gate only on features the connector genuinely uses.
- Do not add
kmVersionto new connectors; it is documentation-only legacy syntax (see Legacy and Compatibility[1]).
Common Mistakes
- Expecting
engineVersion: Xto succeed on engine versionX— equality fails (see above). - Believing
kmVersionenforces anything: it is ignored at runtime. - Gating on a version “to be safe” without an actual feature dependency, which silently disables the connector for users on slightly older engines.
Community Examples
detection
productRequirements
version gating
engineVersion
kmVersion
metricshub
community
connector
hardware
system
Links:
- [1] ../legacy-and-compatibility.html
- [2] https://github.com/metricshub/community-connectors/blob/main/src/main/connector/hardware/HyperV/HyperV.yaml
- [3] https://github.com/metricshub/community-connectors/blob/main/src/main/connector/hardware/Redfish/Redfish.yaml
Search Results for {{siteSearch | truncate:'50'}}
{{resultArray.length}}
Searching...
No results.
