systant/server/systant.toml
2025-08-10 20:34:22 -07:00

131 lines
3.4 KiB
TOML

# Systant Configuration File
# This file controls which metrics are collected and how they're reported
[general]
# Enable/disable entire metric categories
enabled_modules = [
"cpu",
"memory",
"disk",
"gpu",
"network",
"temperature",
"processes",
"system",
]
# Collection intervals (in milliseconds)
collection_interval = 30000 # 30 seconds
startup_delay = 5000 # 5 seconds
[cpu]
# CPU metrics are always lightweight, no specific options needed
enabled = true
[memory]
enabled = true
# Show detailed breakdown (buffers, cached, etc.)
show_detailed = true
[disk]
enabled = true
# Specific mount points to monitor (empty = all)
include_mounts = []
# Mount points to exclude
exclude_mounts = ["/snap", "/boot", "/dev", "/sys", "/proc", "/run", "/tmp"]
# Filesystem types to exclude
exclude_types = ["tmpfs", "devtmpfs", "squashfs", "overlay"]
# Only show disks above this usage percentage
min_usage_percent = 1
[gpu]
enabled = true
# Enable NVIDIA GPU monitoring (requires nvidia-smi)
nvidia_enabled = true
# Enable AMD GPU monitoring (requires rocm-smi or sysfs)
amd_enabled = true
# Maximum number of GPUs to report
max_gpus = 8
[network]
enabled = true
# Specific interfaces to monitor (empty = all)
include_interfaces = []
# Interfaces to exclude (common virtual/loopback interfaces)
exclude_interfaces = ["lo", "docker0", "br-", "veth", "virbr"]
# Only show interfaces with traffic above this threshold (bytes)
min_bytes_threshold = 1024
[temperature]
enabled = true
# Enable CPU temperature monitoring
cpu_temp_enabled = true
# Enable lm-sensors integration (requires 'sensors' command)
sensors_enabled = true
# Temperature units: "celsius" or "fahrenheit"
temp_unit = "celsius"
[processes]
enabled = true
# Number of top processes to report
max_processes = 10
# Sort by: "cpu" or "memory"
sort_by = "cpu"
# Minimum CPU percentage to include process
min_cpu_percent = 0.1
# Minimum memory percentage to include process
min_memory_percent = 0.1
# Truncate command names to this length
max_command_length = 50
[system]
enabled = true
# Additional system info to collect
include_uptime = true
include_load_average = true
include_kernel_version = true
include_os_info = true
# MQTT Configuration (can be overridden by environment variables)
[mqtt]
host = "mqtt.home"
port = 1883
client_id_prefix = "systant"
username = ""
password = ""
# Topics are auto-generated as: systant/{hostname}/stats and systant/{hostname}/commands
# QoS level (0, 1, or 2)
qos = 0
# Home Assistant MQTT Discovery Configuration
[homeassistant]
discovery_enabled = true # Enable/disable HA auto-discovery
discovery_prefix = "homeassistant" # HA discovery topic prefix
[logging]
# Log level: "debug", "info", "warning", "error"
level = "info"
# Log configuration loading and metric collection details
log_config_changes = true
log_metric_collection = false
# Command Execution Configuration
[commands]
enabled = true
# Security: only allow predefined commands, no arbitrary shell execution
max_execution_time = 30 # seconds
log_all_commands = true
# Define your custom commands here - these are examples, customize for your system
[[commands.available]]
name = "screenshot"
trigger = "screenshot"
description = "Take a screenshot and save to home directory"
command = "grim /home/ryan/screenshot-$(date +%Y%m%d-%H%M%S).png"
[[commands.available]]
name = "lock_screen"
trigger = "lock"
description = "Lock the screen immediately"
command = "hyprctl dispatch exec swaylock"