Your 'Systant. A system daemon on Linux that communicates via MQTT to get diagnostic info from, and send commands to, a Linux computer. Written in Elixir because fuck you, and written mostly by Claude because fuck everything.
Go to file
2025-08-02 19:14:04 -07:00
config Add hostname-aware MQTT topics 2025-08-02 18:59:46 -07:00
lib Rename project from system-stats-daemon to systant 2025-08-02 17:06:03 -07:00
rel Remove COOKIE complexity - disable distributed Erlang 2025-08-02 18:15:11 -07:00
test Rename project from system-stats-daemon to systant 2025-08-02 17:06:03 -07:00
.envrc Add flake.nix 2025-08-02 19:14:04 -07:00
.formatter.exs Initial commit: Elixir MQTT system stats daemon 2025-08-02 16:56:10 -07:00
.gitignore Initial commit: Elixir MQTT system stats daemon 2025-08-02 16:56:10 -07:00
debug-nix-store.sh Remove COOKIE complexity - disable distributed Erlang 2025-08-02 18:15:11 -07:00
flake.nix Add flake.nix 2025-08-02 19:14:04 -07:00
mix.exs Remove COOKIE complexity - disable distributed Erlang 2025-08-02 18:15:11 -07:00
mix.lock Initial commit: Elixir MQTT system stats daemon 2025-08-02 16:56:10 -07:00
nixos-module.nix Add hostname-aware MQTT topics 2025-08-02 18:59:46 -07:00
README.md Rename project from system-stats-daemon to systant 2025-08-02 17:06:03 -07:00
systant-manual.nix Remove COOKIE complexity - disable distributed Erlang 2025-08-02 18:15:11 -07:00
systant-old.nix Fix Elixir release configuration 2025-08-02 17:48:24 -07:00
systant-wrapper.nix Remove COOKIE complexity - disable distributed Erlang 2025-08-02 18:15:11 -07:00
systant.nix Add hostname-aware MQTT topics 2025-08-02 18:59:46 -07:00
systant.service Rename project from system-stats-daemon to systant 2025-08-02 17:06:03 -07:00

Systant

An Elixir application that runs as a systemd daemon to:

  1. Publish system stats to MQTT every 30 seconds
  2. Listen for commands over MQTT and log them to syslog

Configuration

Edit config/config.exs to configure MQTT connection:

config :systant, Systant.MqttClient,
  host: "localhost",
  port: 1883,
  client_id: "systant",
  username: nil,
  password: nil,
  stats_topic: "system/stats",
  command_topic: "system/commands",
  publish_interval: 30_000

Building

mix deps.get
mix compile

Running

# Development
mix run --no-halt

# Production release
MIX_ENV=prod mix release
_build/prod/rel/systant/bin/systant start

Systemd Installation

  1. Build production release
  2. Copy binary to /usr/local/bin/
  3. Copy systant.service to /etc/systemd/system/
  4. Enable and start:
sudo systemctl enable systant
sudo systemctl start systant

Features

  • Publishes "Hello from systant" stats every 30 seconds to system/stats topic
  • Listens on system/commands topic and logs received messages
  • Configurable MQTT connection settings
  • Runs as systemd daemon with auto-restart
  • Logs to system journal