Added different intervals for collectors and made them configurable.

This commit is contained in:
2025-05-22 09:57:21 +02:00
parent 85154fcd60
commit 6e6f22f5d4
6 changed files with 186 additions and 67 deletions

View File

@@ -7,6 +7,9 @@ import glob
from typing import Dict, Any, Optional, List, Tuple
import sys
# Default update interval in seconds
DEFAULT_INTERVAL = 30 # 30 seconds
def get_temperature_linux_coretemp() -> List[Tuple[float, str]]:
"""Get CPU temperatures using coretemp module."""
temps = []

View File

@@ -5,6 +5,9 @@ import time
from datetime import datetime
from typing import Dict, Any
# Default update interval in seconds
DEFAULT_INTERVAL = 60 # 1 minute
def collect_metrics() -> Dict[str, Any]:
"""Collect system metrics and return them in the required format."""
# Get system metrics

View File

@@ -4,6 +4,9 @@ import subprocess
from typing import Dict, Any, List
import json
# Default update interval in seconds
DEFAULT_INTERVAL = 300 # 5 minutes
def get_zfs_pools() -> List[Dict[str, Any]]:
"""Get information about ZFS pools."""
try: