MetricsHub
MetricsHub Community Connectors 1.0.22
-
Home
- Connector Developer Guide Detection 13
Detection by Host Type
When to Use
For each host to monitor with MetricsHub, the user will provide 2 critical attributes:
host.name: the host name of the system to monitorhost.type: the type of host (Windows,Linux,AIX,HPUX,Solaris,Network,Storage,Management, etc.)
Use deviceType as an early guardrail to avoid expensive protocol tests on incompatible hosts, where host.type is clearly not a possible target of this connector. This is usually the first criterion in a detection block.
For example, it is pointless to try using Windows-specific connectors on non-Windows systems, so you specify Windows for the deviceType property of the connector, as in the below example.
Syntax
connector:
detection:
criteria:
- type: deviceType
keep:
- Windows
Properties
| Property | Required | Default | Description |
|---|---|---|---|
type |
Yes | - | deviceType |
keep |
No | empty | Allowed host kinds. If host kind is in this list, criterion succeeds. |
exclude |
No | empty | Denied host kinds. If host kind is here and not in keep, criterion fails. |
Runtime Behavior
Evaluation rule is:
- Consider the
host.typeattribute of the host configured by the user in the MetricsHub configuration. - If host kind matches
keep: success. - Else if host kind matches
exclude: failure. - Else success only when
keepis empty.
Important
The keep property has priority over exclude.
Recommended Pattern
- Put
deviceTypefirst in criteria lists. - Use
keepfor strict targeting (Windows,Linux,Storage,Network,OOB). - Use
excludeonly when you intentionally keep a broad target then filter out exceptions.
Common Mistakes
- Using
excludewithoutkeepand expecting strict allow-list behavior. - Adding both
keepandexcludefor the same kind without realizingkeepwins. - Skipping
deviceTypeand letting costly protocol criteria run first.
Examples
Community example (hardware/WinStorageSpaces/WinStorageSpaces.yaml), included directly from the connector source — note that this connector uses NT, the legacy host kind identifier for Windows:
# Must be Windows
- type: deviceType
keep:
- NT
detection
deviceType
host kind
metricshub
community
connector
hardware
system
Search Results for {{siteSearch | truncate:'50'}}
{{resultArray.length}}
Searching...
No results.
