Files
EthicaAgents/ethica-agent.example.yml
T

71 lines
2.4 KiB
YAML

# Ethica Agent configuration
#
# Token (required): set via ETHICA_TOKEN env var (recommended) or here.
# Get it from: admin panel → Company → API tab → Company token
#
# token: REPLACE_ME ← or set ETHICA_TOKEN in .env / environment
# home: https://ethica.no ← or set ETHICA_HOME (default: https://ethica.no)
# interval: 60 ← or set ETHICA_INTERVAL (seconds, default: 60)
interval: 60
widgets:
# ── Server metrics ────────────────────────────────────────────────────────
- type: system_cpu
name: CPU
degrade_threshold: 80 # % → degraded
offline_threshold: 95 # % → offline
- type: system_memory
name: Memory
degrade_threshold: 85
offline_threshold: 97
- type: system_disk
name: Disk /
path: /
degrade_threshold: 80
offline_threshold: 95
# Multiple disks:
# - type: system_disk
# name: Disk /data
# path: /data
# degrade_threshold: 85
# offline_threshold: 95
# ── HTTP endpoint checks ──────────────────────────────────────────────────
- type: http_check
name: My Application
url: https://myapp.example.com
timeout: 10 # seconds
# ── Port / TCP checks ─────────────────────────────────────────────────────
- type: port_check
name: Database
host: localhost
port: 5432
timeout: 5
- type: port_check
name: Redis
host: localhost
port: 6379
# ── Process checks ────────────────────────────────────────────────────────
- type: process_check
name: nginx
process: nginx
- type: process_check
name: Postgres
process: postgres
# ── Custom check (shell command) ──────────────────────────────────────────
# Exit code convention: 0 = online, 1 = degraded, anything else = offline
# - type: custom_cmd
# name: My health check
# cmd: /opt/checks/my-check.sh
# timeout: 30