Commit graph

10 commits

Author SHA1 Message Date
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
Andreas Fuchs
d33d18e535
Return the cached value if it's not time to scan again yet (#18)
* Return the cached value if it's not time to scan again yet

This should ensure that if we have a valid value cached (which ought
to be every time after the first scan), we return it as metrics.

This fixes the crashes that would happen if queries happened earlier
than the re-scan interval allowed.

* Address review feedback: Shorten the time-to-scan logic

We can express this in a single if statement, so it takes fewer lines
to do the "should we check again" check.
2022-08-05 03:09:55 +02:00
Ben Kochie
1625848c5d
Merge pull request #37 from singron/fix-reversed-bits
Fix exit code bit parsing
2022-07-17 15:22:32 +02:00
SuperQ
c0e4746c80
Update build for prometheus-community
Use standard Prometheus Community build infra.
* Update Go modules for new location
* Update references to github URLs
* Update for Go 1.17+

Signed-off-by: SuperQ <superq@gmail.com>
2022-06-17 12:04:48 +02:00
Eric Culp
6b6fd628d2 Fix exit code bit parsing
The previous code was parsing left-to-right, but the bits are actually
numbered right-to-left (least to most significant). Instead of
converting to strings, just use bitmasks.

Fixes https://github.com/prometheus-community/smartctl_exporter/issues/22

Signed-off-by: Eric Culp <eculperic@gmail.com>
2022-03-17 16:57:34 -06:00
Горлов Максим
e27581d56a apply merges 2020-11-14 18:36:34 +03:00
Горлов Максим
cbc437fea9 Parsing smartctl error code; parsing resulting json for smartctl errors; docker moved to subfolder 2020-10-30 00:35:49 +03:00
Christian Pedersen
593ca96a99 Automatically load the available devices 2020-10-06 13:05:00 +02: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