Added different intervals for collectors and made them configurable.
This commit is contained in:
@@ -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 = []
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user