diff --git a/overlays/README.md b/overlays/README.md index 1b87f9d3..bd784dae 100644 --- a/overlays/README.md +++ b/overlays/README.md @@ -13,9 +13,8 @@ overlays/ ├── default.nix # Entrypoint for all overlays ├── computer-use-linux.nix # trycua/computer-use-linux package ├── cua-driver.nix # trycua/cua driver (cua-driver) package -├── smartctl-exporter/ # smartctl_exporter backport (upstream PR #329) -│ ├── default.nix -│ └── 329-explicit-descriptors.patch +├── smartctl-exporter/ # smartctl_exporter pinned to the #329 fix +│ └── default.nix └── fcitx5/ # Chinese input method configuration ├── README.md ├── default.nix # fcitx5 overlay definition @@ -58,6 +57,6 @@ This overlay provides: - `computer-use-linux.nix`: packages `pkgs/computer-use-linux`. - `cua-driver.nix`: packages `pkgs/cua-driver` (used by the computer-use VMs). -- `smartctl-exporter/`: patches `prometheus-smartctl-exporter` with upstream PR +- `smartctl-exporter/`: pins `prometheus-smartctl-exporter` to the upstream commit carrying PR [#329](https://github.com/prometheus-community/smartctl_exporter/pull/329) until smartctl_exporter 0.15.0 is released; see `overlays/smartctl-exporter/default.nix`. diff --git a/overlays/smartctl-exporter/329-explicit-descriptors.patch b/overlays/smartctl-exporter/329-explicit-descriptors.patch deleted file mode 100644 index 6fdeb6c8..00000000 --- a/overlays/smartctl-exporter/329-explicit-descriptors.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/main.go b/main.go -index c5b138a..05a222e 100644 ---- a/main.go -+++ b/main.go -@@ -57,7 +57,44 @@ type SMARTctlManagerCollector struct { - - // Describe sends the super-set of all possible descriptors of metrics - func (i *SMARTctlManagerCollector) Describe(ch chan<- *prometheus.Desc) { -- prometheus.DescribeByCollect(i, ch) -+ ch <- metricSmartctlVersion -+ ch <- metricDeviceModel -+ ch <- metricDeviceCount -+ ch <- metricDeviceCapacityBlocks -+ ch <- metricDeviceCapacityBytes -+ ch <- metricDeviceTotalCapacityBytes -+ ch <- metricDeviceBlockSize -+ ch <- metricDeviceInterfaceSpeed -+ ch <- metricDeviceAttribute -+ ch <- metricDevicePowerOnSeconds -+ ch <- metricDeviceRotationRate -+ ch <- metricDeviceTemperature -+ ch <- metricDevicePowerCycleCount -+ ch <- metricDevicePercentageUsed -+ ch <- metricDeviceAvailableSpare -+ ch <- metricDeviceAvailableSpareThreshold -+ ch <- metricDeviceCriticalWarning -+ ch <- metricDeviceMediaErrors -+ ch <- metricDeviceNumErrLogEntries -+ ch <- metricDeviceBytesRead -+ ch <- metricDeviceBytesWritten -+ ch <- metricDeviceSmartStatus -+ ch <- metricDeviceExitStatus -+ ch <- metricDeviceState -+ ch <- metricDeviceStatistics -+ ch <- metricDeviceErrorLogCount -+ ch <- metricDeviceSelfTestLogCount -+ ch <- metricDeviceSelfTestLogErrorCount -+ ch <- metricDeviceERCSeconds -+ ch <- metricSCSIGrownDefectList -+ ch <- metricReadErrorsCorrectedByRereadsRewrites -+ ch <- metricReadErrorsCorrectedByEccFast -+ ch <- metricReadErrorsCorrectedByEccDelayed -+ ch <- metricReadTotalUncorrectedErrors -+ ch <- metricWriteErrorsCorrectedByRereadsRewrites -+ ch <- metricWriteErrorsCorrectedByEccFast -+ ch <- metricWriteErrorsCorrectedByEccDelayed -+ ch <- metricWriteTotalUncorrectedErrors - } - - // Collect is called by the Prometheus registry when collecting metrics. diff --git a/overlays/smartctl-exporter/default.nix b/overlays/smartctl-exporter/default.nix index 3eb42568..c9143520 100644 --- a/overlays/smartctl-exporter/default.nix +++ b/overlays/smartctl-exporter/default.nix @@ -1,15 +1,23 @@ # smartctl_exporter 0.14.0 derives `Describe()` from the devices it can read at # startup, so when a device only becomes readable later (an NVMe whose ACL # arrives late, or an HDD waking from standby) `Collect()` emits metrics whose -# descriptors were never registered and `/metrics` starts returning HTTP 500, -# which fails the whole scrape and hides even the healthy disks. +# descriptors were never registered and `/metrics` returns HTTP 500, failing the +# whole scrape and hiding even the healthy disks. # -# Backport of upstream PR #329: `Describe()` now sends the full, explicit -# descriptor set. Drop this overlay once smartctl_exporter 0.15.0 is released -# and packaged in nixpkgs: +# Pin the package to the upstream commit that carries the fix (PR #329, merged +# 2026-09-28, then included in the "Update Go (#391)" commit below) instead of +# backporting it as a patch. Drop this overlay once smartctl_exporter 0.15.0 is +# released and packaged in nixpkgs: # https://github.com/prometheus-community/smartctl_exporter/pull/329 _: _final: prev: { - prometheus-smartctl-exporter = prev.prometheus-smartctl-exporter.overrideAttrs (prevAttrs: { - patches = (prevAttrs.patches or [ ]) ++ [ ./329-explicit-descriptors.patch ]; + prometheus-smartctl-exporter = prev.prometheus-smartctl-exporter.overrideAttrs (_prev: { + version = "0.14.0-unstable-2026-09-28"; + src = prev.fetchFromGitHub { + owner = "prometheus-community"; + repo = "smartctl_exporter"; + rev = "6274decc61212cc61e58796cc3b8cf5cfa035809"; + hash = "sha256-KR+j4uLqxVtRpQ7L8UxOypOHZG9CxUGw0ELIO7e6tXc="; + }; + vendorHash = "sha256-PJiMYWdoQ3Zk7sYHveG9uIgOjllgPuu6RjAPVdKUi6Y="; }); }