Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
float
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai3
float
Commits
81c76f78
Commit
81c76f78
authored
2 months ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Ignore SMART test statuses that aren't complete yet
Prevent alerting when SMART tests haven't run yet.
parent
6ba74954
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#86535
failed
2 months ago
Stage: docker_build
Stage: test
Changes
1
Pipelines
17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/float-base/files/node-exporter-scripts/smartmon.py
+3
-0
3 additions, 0 deletions
roles/float-base/files/node-exporter-scripts/smartmon.py
with
3 additions
and
0 deletions
roles/float-base/files/node-exporter-scripts/smartmon.py
+
3
−
0
View file @
81c76f78
...
...
@@ -221,6 +221,9 @@ def collect_self_test_status(device, data):
(
test
[
'
lifetime_hours
'
]
>
most_recent_test_by_type
[
key
][
'
lifetime_hours
'
]):
most_recent_test_by_type
[
key
]
=
test
for
test
in
most_recent_test_by_type
.
values
():
if
'
passed
'
not
in
test
[
'
status
'
]:
# Possibly still ongoing.
continue
labels
=
{
'
test
'
:
to_label_value
(
test
[
'
type
'
][
'
string
'
])}
labels
.
update
(
device
.
labels
)
yield
Gauge
(
'
self_test_status
'
,
labels
,
test
[
'
status
'
][
'
passed
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment