---
date_published: 2026-08-13
date_modified: 2026-08-13
canonical_url: https://metricshub.org/community-connectors/connectors/smartmonlinux.html
---

 [Supported Platforms](../supported-platforms.html)   [Connectors Directory](../connectors-directory.html)

# SmartMon Tools

## Description

This connector discovers and monitors S.M.A.R.T.-enabled physical disk information through the smartd/smartctl utility under Linux.

[community](tags/community.html) [hardware](tags/hardware.html) [linux](tags/linux.html) [storage](tags/storage.html)

[Source](https://github.com/metricshub/community-connectors/tree/main/src/main/connector/hardware/SmartMonLinux/SmartMonLinux.yaml)

## Target

Typical platform: **[Linux](platforms/linux.html)**

Operating system: **Linux**

## Prerequisites

Leverages: **SmartMon Tools**

Technology and protocols: **Commands**

This connector requires advanced privileges on the managed host for the commands below:

- `/usr/sbin/smartctl`
- `/bin/dd`

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/smartctl
metricshub ALL=(root) NOPASSWD: /bin/dd
```

## Examples

### CLI

```batch
metricshub HOSTNAME -t linux -c +SmartMonLinux --ssh -u USER --sudo-command-list /usr/sbin/smartctl,/bin/dd
```

### metricshub.yaml

```yaml
resourceGroups:
  <RESOURCE_GROUP>:
    resources:
      <HOSTNAME-ID>:
        attributes:
          host.name: <HOSTNAME> # Change with actual host name
          host.type: linux
        connectors: [ +SmartMonLinux ] # 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/smartctl", "/bin/dd" ]
```

## Connector Activation Criteria

The **SmartMon Tools** connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:

- Operating System is **Linux**
- The command below succeeds on the monitored host 
  
    - Command: `/bin/ls /usr/sbin/smartd`
    - Output contains: `^/usr/sbin/smartd$` (regex)
- The command below succeeds on the monitored host 
  
    - Command: `/bin/ls /usr/sbin/smartctl`
    - Output contains: `^/usr/sbin/smartctl$` (regex)
- The command below succeeds on the monitored host 
  
    - Command: `/usr/sbin/smartd -q onecheck`
    - Output contains: `Device: .* opened` (regex)
- The command below succeeds on the monitored host 
  
    - Command: `/usr/sbin/smartd -q onecheck`
    - Output contains: `Device: .* is SMART capable` (regex)

## Metrics

| Type | Collected Metrics | Specific Attributes |
| --- | --- | --- |
| **physical_disk** | - `hw.errors{hw.type="physical_disk", error.type="corrected", disk.io.direction="read"}` - `hw.errors{hw.type="physical_disk", error.type="corrected", disk.io.direction="write"}` - `hw.errors{hw.type="physical_disk", error.type="ecc_delayed", disk.io.direction="read"}` - `hw.errors{hw.type="physical_disk", error.type="ecc_delayed", disk.io.direction="write"}` - `hw.errors{hw.type="physical_disk", error.type="ecc_fast", disk.io.direction="read"}` - `hw.errors{hw.type="physical_disk", error.type="ecc_fast", disk.io.direction="write"}` - `hw.errors{hw.type="physical_disk", error.type="invocations", disk.io.direction="read"}` - `hw.errors{hw.type="physical_disk", error.type="invocations", disk.io.direction="write"}` - `hw.errors{hw.type="physical_disk", error.type="non_medium"}` - `hw.errors{hw.type="physical_disk", error.type="rereads_rewrites", disk.io.direction="read"}` - `hw.errors{hw.type="physical_disk", error.type="rereads_rewrites", disk.io.direction="write"}` - `hw.errors{hw.type="physical_disk", error.type="uncorrected", disk.io.direction="read"}` - `hw.errors{hw.type="physical_disk", error.type="uncorrected", disk.io.direction="write"}` - `hw.status{hw.type="physical_disk", state="degraded\|failed\|ok"}` - `hw.status{hw.type="physical_disk", state="predicted_failure"}` - `hw.status{hw.type="physical_disk", state="present"}` | - `hw.parent.type` - `id` - `serial_number` - `vendor` |
| **smart** | - `hw.physical_disk.smart` | - `hw.id` - `hw.physical_disk.smart_attribute` |
| **temperature** | - `hw.status{hw.type="temperature", state="present"}` - `hw.temperature` - `hw.temperature.limit{limit_type="high.degraded"}` | - `hw.parent.type` - `id` - `name` - `sensor_location` |
