Add config option to exclude metrics

This commit is contained in:
Holger Obermaier
2026-03-09 14:00:32 +01:00
parent 162b8cb6d4
commit a4332554f4
2 changed files with 183 additions and 84 deletions

View File

@@ -1,3 +1,14 @@
<!--
---
title: smartmon metric collector
description: Collect S.M.A.R.T data from NVMEs
categories: [cc-metric-collector]
tags: ['Admin']
weight: 2
hugo_path: docs/reference/cc-metric-collector/collectors/smartmonMetric.md
---
-->
## `smartmon` collector
```json
@@ -6,6 +17,10 @@
"exclude_devices": [
"/dev/sda"
],
"excludeMetrics": [
"smartmon_warn_temp_time",
"smartmon_crit_comp_time"
]
"devices": [
"name": "/dev/nvme0"
"type": "nvme"
@@ -13,9 +28,12 @@
}
```
The `smartmon` collector reads the data from the command `smartctl`. It retrieves S.M.A.R.T data from disks
The `smartmon` collector retrieves S.M.A.R.T data from NVMEs via command `smartctl`.
Available NVMEs can be either automatically detected by a device scan or manually added with the "devices" config option.
Metrics:
* `smartmon_temp`: Temperature of the device (`unit=degC`)
* `smartmon_avail_spare`: Amount of spare left (`unit=percent`)
* `smartmon_percent_used`: Percentage of the device is used (`unit=percent`)
@@ -29,5 +47,4 @@ Metrics:
* `smartmon_media_errors`: Media errors of the device
* `smartmon_errlog_entries`: Error log entries
* `smartmon_warn_temp_time`: Time above the warning temperature threshold
* `smartmon_crit_temp_time`: Time above the critical temperature threshold
* `smartmon_crit_comp_time`: Time above the critical composite temperature threshold