---
date_published: 2026-08-13
date_modified: 2026-08-13
canonical_url: https://metricshub.org/community-connectors/connectors/lmsensors.html
---

 [Supported Platforms](../supported-platforms.html)   [Connectors Directory](../connectors-directory.html)

# lm_sensors

## Description

This connector enables the monitoring of environment sensors on Linux, through the sensors command.

This connector is superseded by: 

- [IpmiTool](ipmitool.html)

[community](tags/community.html) [hardware](tags/hardware.html) [linux](tags/linux.html)

[Source](https://github.com/metricshub/community-connectors/tree/main/src/main/connector/hardware/lmsensors/lmsensors.yaml)

## Target

Typical platform: **[Linux](platforms/linux.html)**

Operating system: **Linux**

## Prerequisites

Leverages: **lm_sensors**

Technology and protocols: **Commands**

This connector requires advanced privileges on the managed host for the commands below:

- `/usr/sbin/dmidecode`
- `/usr/bin/sensors`

This connector therefore needs to run as **root** or you need to configure a privilege-escalation mechanism like `sudo` on the managed host to allow the monitoring account to run the commands listed above.

Sample of **/etc/sudoers** to allow the above commands to be run as **root** by the **metricshub** account:  


```bash
metricshub ALL=(root) NOPASSWD: /usr/sbin/dmidecode
metricshub ALL=(root) NOPASSWD: /usr/bin/sensors
```

## Examples

### CLI

```batch
metricshub HOSTNAME -t linux -c +lmsensors --ssh -u USER --sudo-command-list /usr/sbin/dmidecode,/usr/bin/sensors
```

### metricshub.yaml

```yaml
resourceGroups:
  <RESOURCE_GROUP>:
    resources:
      <HOSTNAME-ID>:
        attributes:
          host.name: <HOSTNAME> # Change with actual host name
          host.type: linux
        connectors: [ +lmsensors ] # Optional, to load only this connector
        protocols:
          ssh:
            username: <USERNAME> # Change with actual credentials
            password: <PASSWORD> # Encrypted using metricshub-encrypt
            useSudo: true
            useSudoCommands: [ "/usr/sbin/dmidecode", "/usr/bin/sensors" ]
```

## Connector Activation Criteria

The **lm_sensors** connector will be automatically activated, and its status will be reported as OK if all the below criteria are met, and no other connector capable of discovering **temperature** instances is activated:

- Operating System is **Linux**
- The command below succeeds on the monitored host 
  
    - Command: ` /usr/bin/sensors -h`
    - Output contains: `Usage: sensors ` (regex)

## Metrics

| Type | Collected Metrics | Specific Attributes |
| --- | --- | --- |
| **enclosure** | - `hw.status{hw.type="enclosure", state="present"}` | - `bios_version` - `id` - `serial_number` - `type` - `vendor` |
| **fan** | - `hw.fan.speed` - `hw.fan.speed.limit{limit_type="low.critical"}` - `hw.fan.speed.limit{limit_type="low.degraded"}` - `hw.status{hw.type="fan", state="present"}` | - `hw.parent.id` - `hw.parent.type` - `id` - `name` - `sensor_location` |
| **temperature** | - `hw.status{hw.type="temperature", state="present"}` - `hw.temperature` - `hw.temperature.limit{limit_type="high.critical"}` - `hw.temperature.limit{limit_type="high.degraded"}` | - `hw.parent.id` - `hw.parent.type` - `id` - `name` |
| **voltage** | - `hw.status{hw.type="voltage", state="present"}` - `hw.voltage` - `hw.voltage.limit{limit_type="high.critical"}` - `hw.voltage.limit{limit_type="low.critical"}` | - `hw.parent.id` - `hw.parent.type` - `id` - `name` - `sensor_location` |
