Commit e1fec091 authored by wolfsack's avatar wolfsack
Browse files

Update metrics.py

parent b91fac1d
import platform, time
import platform
import time
import psutil
......@@ -12,9 +13,9 @@ def metrics(node: int):
memory = psutil.virtual_memory()
boot_time = psutil.boot_time()
system_time = time.time()
fan_speed = psutil.sensors_fans()
partitions = psutil.disk_partitions()
metrics_list = [Metric(
metric_name="cpu_usage",
metric_type="gauge",
......@@ -57,6 +58,14 @@ def metrics(node: int):
params={
"node": f"{node}"
}
), Metric(
metric_name="fan_speed",
metric_type="gauge",
comment="Fan speed in RPM",
value=fan_speed,
params={
"node": f"{node}"
}
), Metric(
metric_name="memory_usage",
metric_type="gauge",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment