The smartd check
Project description
smartd
Overview
This integration monitors S.M.A.R.T. disk health by reading state files written by the smartd daemon (part of smartmontools). It collects key disk health attributes such as temperature, reallocated sectors, power-on hours, and pending sector counts, and reports the overall health status of each drive as a service check.
Unlike other approaches that shell out to smartctl (which requires root privileges), this integration reads the state files that smartd already maintains, making it work without any privilege escalation.
Setup
Prerequisites
- The
smartddaemon must be running and writing state files (default location:/var/lib/smartmontools/). - The
dd-agentuser must have read access to the state files (they are typically world-readable with644permissions).
Installation
The integration is published to PyPI. The Datadog Agent does not use public PyPI directly, so install it by downloading the wheel and handing it to the Agent's integration install command.
# Download the wheel using the Agent's embedded pip
/opt/datadog-agent/embedded/bin/pip download --no-deps -d /tmp datadog-smartd
# Install the downloaded wheel into the Agent
datadog-agent integration install --local-wheel /tmp/datadog_smartd-*.whl
# Drop the example config into place and edit as needed
mkdir -p /etc/datadog-agent/conf.d/smartd.d
cp /opt/datadog-agent/embedded/lib/python*/site-packages/datadog_checks/smartd/data/conf.yaml.example \
/etc/datadog-agent/conf.d/smartd.d/conf.yaml
Configuration
Edit /etc/datadog-agent/conf.d/smartd.d/conf.yaml to configure the check:
init_config:
instances:
- smartd_state_dir: /var/lib/smartmontools
min_collection_interval: 120
Then restart the Agent.
Validation
Run the Agent's status subcommand and look for smartd under the Checks section:
datadog-agent status
Or run the check directly:
datadog-agent check smartd
Data Collected
Metrics
See metadata.csv for a list of metrics provided by this integration.
Service Checks
smartd.disk_health: Returns OK if the drive is healthy, WARNING if reallocated sectors, pending sectors, or offline uncorrectable counts are non-zero, CRITICAL if a normalized attribute value reaches 0.
smartd.can_read: Returns OK if smartd state files were found and parsed successfully, CRITICAL otherwise.
Events
The smartd integration does not include any events.
Support
For help, open an issue on the GitHub repository.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datadog_smartd-0.1.2.tar.gz.
File metadata
- Download URL: datadog_smartd-0.1.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf03bc4a08b4ba5209801365c6512c396259322e6a1985a4ea71b7d7107f35b5
|
|
| MD5 |
e7244fb1ae0cab09bd65c8d01cf14f59
|
|
| BLAKE2b-256 |
f3a8a371938bcc32847dff6ee942602f78c162964daffd8cbf034e50a181c088
|
Provenance
The following attestation bundles were made for datadog_smartd-0.1.2.tar.gz:
Publisher:
release.yml on jaredledvina/datadog-smartd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datadog_smartd-0.1.2.tar.gz -
Subject digest:
bf03bc4a08b4ba5209801365c6512c396259322e6a1985a4ea71b7d7107f35b5 - Sigstore transparency entry: 1253314030
- Sigstore integration time:
-
Permalink:
jaredledvina/datadog-smartd@4582412ce7db7102107b53eca69214485d7a024b -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jaredledvina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4582412ce7db7102107b53eca69214485d7a024b -
Trigger Event:
push
-
Statement type:
File details
Details for the file datadog_smartd-0.1.2-py3-none-any.whl.
File metadata
- Download URL: datadog_smartd-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2981c9a0fb64148fd2ee0003b3be59a3a1b302a02ddc5f8ba436e437fe73af93
|
|
| MD5 |
e7b1142b844381a644fb58f1cd09d87c
|
|
| BLAKE2b-256 |
c332d7630a3122dd1dad4f573163905892b1195165c220dc0080cedf54b4e702
|
Provenance
The following attestation bundles were made for datadog_smartd-0.1.2-py3-none-any.whl:
Publisher:
release.yml on jaredledvina/datadog-smartd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datadog_smartd-0.1.2-py3-none-any.whl -
Subject digest:
2981c9a0fb64148fd2ee0003b3be59a3a1b302a02ddc5f8ba436e437fe73af93 - Sigstore transparency entry: 1253314160
- Sigstore integration time:
-
Permalink:
jaredledvina/datadog-smartd@4582412ce7db7102107b53eca69214485d7a024b -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jaredledvina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4582412ce7db7102107b53eca69214485d7a024b -
Trigger Event:
push
-
Statement type: