sentrysoftware / metricshub

Universal Metrics Collection for OpenTelemetry
https://metricshub.com
GNU Affero General Public License v3.0
15 stars 4 forks source link

Don't report `hw.status{state="present"}` for `cpu` monitors discovered by Linux and Window connectors #412

Closed NassimBtk closed 2 months ago

NassimBtk commented 2 months ago

Proposal

The missing device detection in HardwarePostDiscoveryStrategy should exclude monitors discovered from connectors that lack the hardware tag.

MedMaalej commented 2 months ago

I tested the fix locally on my computer. The tests covered those cases:

Grafana should not display any hw.status metric at all.

testStatusBabbage

Grafana should display hw.status metric for all nonendpoint host monitors for which the connector has "hardware" tag. For endpoint host monitors, only the endpoint hosts having at least one connector monitor having "hardware" tag.

testStatusWinStorageConnector testStatusWinStorageDiskController testStatusWinStorageHost testStatusWinStorageLogicalDisk testStatusWinStoragePhysicalDik