Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Koch
monitoring-ws20
Commits
fb07dc83
Commit
fb07dc83
authored
Nov 27, 2021
by
wolfsack
Browse files
Update metrics.py
parent
2bb0087e
Changes
1
Hide whitespace changes
Inline
Side-by-side
project/pi/app/metrics.py
View file @
fb07dc83
...
...
@@ -73,14 +73,17 @@ def metrics():
}
)]
print
(
os
.
name
)
print
(
platform
.
system
())
# raspberry pi exclusive
if
platform
.
system
()
==
"Linux"
:
vcgm
=
Vcgencmd
()
temp
=
vcgm
.
measure_temp
()
print
(
temp
)
temp
=
Vcgencmd
().
measure_temp
()
metrics_list
.
append
(
Metric
(
metric_name
=
"cpu_temperature"
,
metric_type
=
"gauge"
,
comment
=
"CPU Temperature"
,
value
=
temp
,
params
=
None
))
for
partition
in
partitions
:
disk
=
psutil
.
disk_usage
(
partition
[
1
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment