Agent configuration

File locations

The agent searches for configuration files in this order:

  • /etc/jackadi/agent.yaml (system-wide, recommended for production)
  • $HOME/.jackadi/agent.yaml (user-specific, good for development)
  • ./agent.yaml (current directory)

Custom configuration file:

agent --config /path/to/custom-agent.yaml

Example

Complete agent.yaml configuration with explanations:

# Agent identification
agent-id: "my-agent-01"

# Manager connection settings
manager-address: "127.0.0.1"
manager-port: "40080"
reconnect-delay: 10

# Plugin configuration
plugin-dir: "/var/lib/jackadi/plugins"
plugin-server-port: "40081"

# Security settings (mTLS)
mtls: true
mtls-key: "/etc/jackadi/certs/agent.key"
mtls-cert: "/etc/jackadi/certs/agent.crt"
mtls-manager-ca-cert: "/etc/jackadi/certs/ca.crt"

# Custom DNS resolvers (optional)
custom-resolvers:
  - "8.8.8.8:53"
  - "1.1.1.1:53"

Environment variables

All configuration options can be set via environment variables using the prefix JACKADI_AGENT_ and converting kebab-case to UPPER_SNAKE_CASE:

# Agent identification
export JACKADI_AGENT_AGENT_ID="prod-web-01"

# Manager connection
export JACKADI_AGENT_MANAGER_ADDRESS="manager.company.com"
export JACKADI_AGENT_MANAGER_PORT="40080"

# Plugin configuration
export JACKADI_AGENT_PLUGIN_DIR="/opt/agent/plugins"
export JACKADI_AGENT_PLUGIN_SERVER_PORT="40081"

# Security
export JACKADI_AGENT_MTLS="true"
export JACKADI_AGENT_MTLS_KEY="/etc/jackadi/certs/agent.key"
export JACKADI_AGENT_MTLS_CERT="/etc/jackadi/certs/agent.crt"
export JACKADI_AGENT_MTLS_MANAGER_CA_CERT="/etc/jackadi/certs/ca.crt"

# Network (optional)
export JACKADI_AGENT_CUSTOM_RESOLVERS="10.0.1.100:53,10.0.1.101:53"
export JACKADI_AGENT_RECONNECT_DELAY="5"

Container deployment example:

# Docker environment variables
docker run -d \
  -e JACKADI_AGENT_AGENT_ID="container-agent-$(hostname)" \
  -e JACKADI_AGENT_MANAGER_ADDRESS="manager.internal" \
  -e JACKADI_AGENT_MTLS="true" \
  -v /etc/jackadi/certs:/certs:ro \
  jackadi/agent

Command-line options

The agent provides comprehensive command-line configuration:

agent [OPTIONS]
OptionDefaultDescription
--idhostnameSet agent ID
--manager-address127.0.0.1Manager address
--manager-port40080Manager port
--reconnect-delay10Delay in seconds between reconnection attempts
--plugin-dir/var/lib/jackadi/pluginsDirectory for plugins
--plugin-server-port40081Port for plugin server
--mtlstrueUse mTLS for secure connection
--mtls-keyAgent TLS key filepath
--mtls-certAgent TLS certificate filepath
--mtls-manager-ca-certManager CA certificate filepath
--custom-resolversCustom DNS resolvers for GRPC connections (comma-separated)
--configConfiguration file path
--version, -vPrint version information

Custom DNS resolution

For environments with complex networking, Jackadi supports custom DNS resolution:

agent --manager-address=manager.lan \
  --custom-resolvers="192.0.2.1:53,192.0.2.2:53"

Configuration examples:

custom-resolvers:
  - "192.0.2.1:53"
  - "192.0.2.2:53"