Configuration

Configuration files

The configuration files are located in /opt/eva4/etc folder. If the files are missing, the default values are used.

eva_config

Location: etc/eva_config

A minimal config, used by “./sbin/eva-control” shell script to start the node server:

# MAX_START_WAIT=10 # max start wait (for regular mode)
# VERBOSE_STARTUP=0 # verbose startup
# SYSTEM_NAME=node1 # override the system name
# PID_FILE=var/eva.pid # override the pid file location
# MODE=regular # or spoint
# ARGS="--connection-path server:port" # secondary point connection path

watchdog

Location: etc/watchdog

If started in the regular mode, “eva-control” script starts an additional watchdog shell script, which continuously monitors eva.core and restarts the node server in case of failures.

# INTERVAL=30
# MAX_TIMEOUT=2

Configuration registry keys

The configuration registry keys are used by the core to configure itself and additional services. To apply changes, the node server must be restarted:

/opt/eva4/sbin/eva-control restart
# or using eva-shell
eva server restart

The keys can be edited with:

/opt/eva4/sbin/eva-registry-cli edit eva/config/X
# or using eva-shell
eva edit config/X

eva/config/core

The primary core configuration

# worker threads (max recommended = number of CPUs)
workers: 2
# the default timeout
timeout: 5
# the suicide timeout, used during shutdown (the node process is forcibly
# killed after)
suicide_timeout: 15
# instantly save item states
instant_save: true
# keep action history in memory (seconds)
keep_action_history: 86400
# optional inventory database (for huge projects)
# SQLite:
#inventory_db: sqlite:///opt/eva4/var/inventory.db
# MySQL:
#inventory_db: mysql://USER:PASSWORD@HOST/DB
# PostgreSQL
#inventory_db: postgres://USER:PASSWORD@HOST/DB

eva/config/bus

The node bus configuration

# queue size
queue_size: 32768
# bus buffer size (core + defaults for services)
buf_size: 8192
# buffer time-to-live (microseconds)
buf_ttl: 10
# bus sockets, default timeout = core timeout
sockets:
  # always keep this one unles you know what you are doing
  - var/bus.ipc
  # allow bus calls from remotes (zero security)
  #- 0.0.0.0:7777
  # allow bus calls from remotes (with config/ACLs)
  #- path: 0.0.0.0:7778
    #buf_size: 16384 # override the default buf size
    #buf_ttl: 20 # override the default buf ttl
    #timeout: 10 # override the default timeout
    #clients: # if defined, AAA map is applied
      #- name: some.client1
        #hosts: # allowed hosts (ignored for UNUX sockets)
          #- 192.168.22.55/32
        #p2p: # allowed p2p peers
          #- "*"
        #broadcast: # allowed broadcast requests
          #- "*"
        #publish: # allowed topics to publish
          #- "#"
        #subscribe: # allowed topics to subscribe
          #- "#"

eva/config/registry

The built-in registry service configuration

# The registry database configuration
# create N reserved copies when a key is modified
auto_bak: 10
# do not create backup version for these keys/subkeys
skip_bak:
  - eva/state
  - eva/cache
# registry cache size (items)
cache_size: 10000
# strict data schema (keep this)
strict_schema: true
# auto-flush all operations to disk (crash-free)
auto_flush: true

eva/config/logs

Logging configuration

# Core logger configuration
# Levels: trace, debug, info, warn, error
# Only a single console/memory/bus logger is supported
- output: console
  level: info
- output: bus
  level: info
- output: memory
  level: info
  keep: 86400
- output: file
  level: info
  # regular / json
  format: regular
  path: log/eva.log
- output: syslog
  level: info

eva/config/python-venv

Configuration of the optional Python virtual environment. To apply changes, it must be rebuilt with the command:

/opt/eva4/sbin/venvmgr build
# use system PIP
use_system_pip: false
# path to Python executable
python: python3
# use system site packages
system_site_packages: false
# skip packages (enable system site packages to let venv use preinstalled)
skip: []
# - pandas
# specify extra PIP3 options e.g., -v for verbose
pip_extra_options: ""
# additional module
extra: []
# - eva-shell
# mirror moduls for additional Python versions
mirror_extra_versions: []

Troubleshooting

If certain parts of the configuration are missing or contain invalid values, the node may stop starting. Sometimes there may be no messages in logs, e.g. if the core or the logging system configuration is broken.

In this case, launch the node server in verbose mode with the console output:

/opt/eva/sbin/eva-control launch

Or using eva-shell:

eva server launch