Commit 3d6a84ff authored by wolfsack's avatar wolfsack
Browse files

Update metrics.py

parent 013a3776
......@@ -13,11 +13,9 @@ def metrics(node: int):
memory = psutil.virtual_memory()
boot_time = psutil.boot_time()
system_time = time.time()
fan_speed = psutil.sensors_fans()
tcp_connections = len(psutil.net_connections(kind='tcp'))
partitions = psutil.disk_partitions()
print(fan_speed)
metrics_list = [Metric(
metric_name="cpu_usage",
metric_type="gauge",
......@@ -61,10 +59,10 @@ def metrics(node: int):
"node": f"{node}"
}
), Metric(
metric_name="fan_speed",
metric_name="tcp_connections",
metric_type="gauge",
comment="Fan speed in RPM",
value=fan_speed,
comment="Number of TCP connections",
value=tcp_connections,
params={
"node": f"{node}"
}
......
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