---
date_published: 2026-08-13
date_modified: 2026-08-13
canonical_url: https://metricshub.org/community-connectors/connectors/mib2switch.html
---

 [Supported Platforms](../supported-platforms.html)   [Connectors Directory](../connectors-directory.html)

# Ethernet Switch with Sensors (SNMP)

## Description

This connector discovers the enclosure and Ethernet ports of a system equipped with an MIB-2 standard SNMP Agent.

This connector supersedes: 

- [GenericSwitchEnclosure](genericswitchenclosure.html)

[community](tags/community.html) [hardware](tags/hardware.html) [network](tags/network.html)

[Source](https://github.com/metricshub/community-connectors/tree/main/src/main/connector/hardware/MIB2Switch/MIB2Switch.yaml)

## Target

Typical platforms: **[Arista](platforms/arista.html), [SNMP](platforms/snmp.html)**

Operating system: **Network Device**

## Prerequisites

Leverages: **MIB-2, Entity-Sensor-MIB, SNMP**

Technology and protocols: **SNMP**

## Examples

### CLI

```batch
metricshub HOSTNAME -t network -c +MIB2Switch --snmp v2c --community public
```

### metricshub.yaml

```yaml
resourceGroups:
  <RESOURCE_GROUP>:
    resources:
      <HOSTNAME-ID>:
        attributes:
          host.name: <HOSTNAME> # Change with actual host name
          host.type: network
        connectors: [ +MIB2Switch ] # Optional, to load only this connector
        protocols:
          snmp:
            version: v2c # Read documentation for v1, v2c and v3
            community: public # or probably something more secure
```

## Connector Activation Criteria

The **Ethernet Switch with Sensors (SNMP)** connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:

- An **SNMP Get-Next** on the OID `1.3.6.1.2.1.2.2.1` must return a value in the same subtree

## Metrics

| Type | Collected Metrics | Specific Attributes |
| --- | --- | --- |
| **enclosure** | - `hw.status{hw.type="enclosure", state="present"}` | - `bios_version` - `id` - `model` - `name` - `serial_number` - `type` - `vendor` |
| **fan** | - `hw.fan.speed` - `hw.status{hw.type="fan", state="degraded\|failed\|ok"}` - `hw.status{hw.type="fan", state="present"}` | - `hw.parent.id` - `hw.parent.type` - `id` - `info` - `name` |
| **network** | - `hw.errors{hw.type="network"}` - `hw.network.bandwidth.limit` - `hw.network.dropped{network.io.direction="receive"}` - `hw.network.dropped{network.io.direction="transmit"}` - `hw.network.io{direction="receive"}` - `hw.network.io{direction="transmit"}` - `hw.network.packets{direction="receive"}` - `hw.network.packets{direction="transmit"}` - `hw.network.up` - `hw.status{hw.type="network", state="degraded\|failed\|ok"}` - `hw.status{hw.type="network", state="present"}` | - `device_type` - `hw.network.alias` - `hw.network.name` - `hw.parent.id` - `hw.parent.type` - `id` - `name` - `physical_address` - `physical_address_type` |
| **temperature** | - `hw.status{hw.type="temperature", state="degraded\|failed\|ok"}` - `hw.status{hw.type="temperature", state="present"}` - `hw.temperature` | - `hw.parent.id` - `hw.parent.type` - `id` - `name` |
| **voltage** | - `hw.status{hw.type="voltage", state="degraded\|failed\|ok"}` - `hw.status{hw.type="voltage", state="present"}` - `hw.voltage` | - `hw.parent.id` - `hw.parent.type` - `id` - `name` - `sensor_location` |
