Commit graph

25 commits

Author SHA1 Message Date
Robin H. Johnson
9113c6cf0f feat: Better SCSI/SAS support
Fix the following metrics that were exported as zero because the
exporter did not know how to read them for SCSI devices:
- smartctl_device_bytes_read
- smartctl_device_bytes_written
- smartctl_device_power_cycle_count

New metrics:
- smartctl_read_errors_corrected_by_eccdelayed
- smartctl_read_errors_corrected_by_eccfast
- smartctl_write_errors_corrected_by_eccdelayed
- smartctl_write_errors_corrected_by_eccfast

Fix labels:
- smartctl_device{model_name} is now populated for SCSI/SAS, using
  scsi_model_name.

New labels:
- smartctl_device{} gains:
  scsi_product,scsi_revision,scsi_vendor,scsi_version

Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
2023-10-16 10:15:57 -07:00
Konstantin Shalygin
1ab518e696
* split block mine to mineBlockSize() from mineCapacity()
* remove redundant meta labels from SCSI metrics
* added `smartctl_device_nvme_capacity_bytes` metric
* for some devices, such as 2.5" NVMe Intel & Micron the `family` field may be empty

The `.user_capacity` exists only when NVMe have single namespace. Otherwise,
for NVMe deivces with multiple namespaces, when device name used witout
namespace number (exporter case) `.user_capacity` will be absent

```
smartctl --info --health --attributes \
--tolerance=verypermissive --nocheck=standby --format=brief --log=error \
/dev/nvme11 --json | jq '.user_capacity'

null

smartctl --info --health --attributes \
--tolerance=verypermissive --nocheck=standby --format=brief --log=error \
/dev/nvme11 --json | jq '.nvme_total_capacity'

3840755982336
```

Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
2023-08-26 21:28:31 +03:00
SuperQ
d5fb66c5f1
Fix metricDeviceCount gauge name
Prometheus naming conventions reserve `_count` for the counter in
histograms. For gauge values the naming convention is to use the plural
of the thing being counted.

Signed-off-by: SuperQ <superq@gmail.com>
2023-08-16 09:21:17 +02:00
David Randall
f5b403b5ba
Merge pull request #129 from Knalltuete5000/devices_count
Add counter for the number of devices configured or dynamically discovered
2023-08-15 19:17:09 -04:00
David Randall
8331d7f6a9
Merge pull request #137 from tekert/remove_duplicate2
Remove duplicate smartctl_device_status metric
2023-08-10 13:25:23 -04:00
tekert
d7fb89ee2c Forgot cleaning the non used metric.
smartctl_device_status is not mined anymore,
smartctl_device_smart_status replaces it.

Signed-off-by: tekert <tekert@gmail.com>
2023-07-29 13:13:33 -03:00
Denys Lemeshko
637ad4223b Critical metrics for SCSI disks added
Signed-off-by: Denys Lemeshko <denys.lemeshko@pm.bet>
2023-06-29 14:50:45 -05:00
Niklas Schwarz
d26c3a82ea Add counter for the number of devices configured or dynamically discovered
Signed-off-by: Niklas Schwarz <schwarz.niklas@hotmail.de>
2023-06-28 11:40:41 +02:00
Konstantin Shalygin
397a7a55f0 Added disk form_factor meta label
The requirement from field engineers is knowledge of the form factor of the device, i.e. 3.5", 2.5"

* updated EXAMPLE.md
* fixed copy-paste issue `Starting systemd_exporter`

Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
2022-10-17 14:28:05 +07:00
Konstantin Shalygin
82266c0397 Reduced number of meta labels
On test stand with 5 disks data size from exporter reduced from 148KB to 82KB

Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
2022-10-14 14:22:41 +07:00
Konstantin Shalygin
56cd874440 Removed doubled NVMe metrics
Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
2022-10-13 19:45:25 +07:00
Ben Kochie
920c3429b1
Release 0.7.0 (#50)
First prometheus-community release.

* [FEATURE] Add various new metrics #14
* [BUGFIX] Fix exit code bit parsing #37

Signed-off-by: SuperQ <superq@gmail.com>
2022-08-05 03:37:13 +02:00
Горлов Максим
7f4c259c12 chripede-master merge 2020-11-14 18:30:32 +03:00
Горлов Максим
c962031b18 merging tavyc 2020-11-14 17:57:43 +03:00
Christian Pedersen
315d1538aa Calculate bytes read/written 2020-10-02 15:14:40 +02:00
Christian Pedersen
1b15cbbec2 Add NVMe metrics 2020-10-02 13:30:45 +02:00
Octavian Cerna
9e58dd6fd2 Add a new metric smartctl_device_erc_seconds for reporting the device Error Recovery Control (TLER) setting. 2020-07-27 00:37:43 +03:00
Octavian Cerna
53399a5e73 Add a new metrics smartctl_device_self_test_log_count and smartctl_device_self_test_log_error_count for the device SMART Self-Test Logs. 2020-07-27 00:16:08 +03:00
Octavian Cerna
3e17706839 Add a new metric smartctl_device_error_log_count for the SMART error log counts. 2020-07-26 23:49:09 +03:00
Octavian Cerna
3feff84fbb Add a new metric smartctl_device_state for the device state from ATA SCT. 2020-07-26 22:54:54 +03:00
Octavian Cerna
9e10465744 Add a new metric smartctl_device_status for the SMART health status. 2020-07-26 22:31:04 +03:00
Zoltan Langi
965204547a I've added support for NVMe drives and also created a docker file so a container can be built.
I've added the following metrics for the NVMe drives:
smart_status, critical_warning, available_spare, media_errors
2019-12-19 11:17:35 +01:00
Горлов Максим
a3cc59ddda short and long flags, device statistics 2019-08-17 13:18:48 +03:00
Горлов Максим
beb765eb1a option for set minimum time period between run smartctl; smartctl info metric 2019-08-16 00:01:16 +03:00
Горлов Максим
9e6e240e85 First commit 2019-08-14 23:34:49 +03:00