search
Popular searches:

ASIC Hub Configuration

This article describes ASIC Hub configuration file syntax and options.

Default paths for ASIC Hub configuration are:

  • Linux - /etc/asic-hub/config.toml
  • Windows - C:\Program Files\Hiveon\ASIC Hub\config.toml

Configuration example

# API URL
#APIUrl = "http://api.hiveos.farm"

# Application Update Server URL
#UpdateServer = "https://download.hiveos.farm/hub"

# Max OS threads count (default is CPU cores count)
#MaxThreads=8

# Directory for temporary files (download cache, etc)
#
# Default is OS temp directory
#TempDir = "/tmp"

[HTTP]
# HTTP server listen address
Listen = ":8800"

# Static files directory for web UI
StaticDir = "/opt/asic-hub/public"

# HTTP response write timeout (optional)
#WriteTimeout = "40m"

# HTTP request read timeout (optional)
#ReadTimeout = "1m"

[LocalState]
# Path for SQLite database with appdata
DB = "/var/lib/asic-hub/data.db"

[ARP]
# Enable ARP scanner.
EnableScanner = true

# Network scan interval.
#ScanInterval = "30s"

[Log]
# Controls debug logging
#Debug = true

# Log file path
Path = "/var/log/asic-hub/hub.json"

# Max size for log file before roration
MaxFileSize = 12

# Max rotated log files count
MaxBackups = 5

# Max age in days for log file before rotation
MaxAge = 7

[Monitoring]
# Max devices count per thread for monitoring (optional)
MaxGroupSize = 30

# Default device heartbeat interval (optional)
#DefaultPingInterval = "10s"

# IP address probe timeout for scanner (optional)
#ProbeTimeout = "5s"

# Device ping timeout (optional)
ConnectTimeout = "10s"

Updating configuration

To update configuration, modify a configuration file and restart ASIC Hub to apply changes.

  • Linux - sudo systemctl restart asic-hub
  • Windows - net stop asic-hub && net start asic-hub (as Administrator)

Configuration description

Property Type Description Defaults
APIUrl String Hive OS API Address. Can be changed to other API mirror like http://amster.hiveos.farm http://api.hiveos.farm
UpdateServer String ASIC Hub update server URL. Can be changed to other mirror. https://download.hiveos.farm/hub
MaxThreads Number CPU threads count to use by ASIC Hub. All CPU threads
TempDir String Path to temporary directory to store ASIC Hub temporary files

HTTP

[HTTP] block contains settings for ASIC Hub HTTP server that server web interface.

Property Type Description
Listen String Listen address for HTTP server
StaticDir String Path to web ui assets
WriteTimeout String Response write timeout
ReadTimeout String HTTP request read timeout

LocalState

[LocalState] block contains ASIC Hub data storage settings.

Property Type Description
DB String Path to ASIC Hub database file

ARP

[ARP] block controls ARP scanner.

ARP scanner scans local network for network devices and detects IP address changes using ASIC MAC address.

We recommend to turn ARP scanner off if all ASICs in a network use static IP addresses.

Property Type Description Defaults
EnableScanner Boolean Enable ARP scanner true for Linux, false for Windows
ScanInterval String Interval between ARP requests 30s

Log

[Log] block controls logging.

Property Type Description
Debug Boolean Enable debug log (for troubleshooting purposes)
Path String Path to log file
MaxFileSize Number Max log file size before rotation
MaxBackups Number Max log file backups
MaxAge Number Max log file age in days before rotation

Monitoring

[Monitoring] block controls device monitoring.

Settings like ConnectTimeout and ProbeTimeout are depends on response time of your ASICs. The MaxGroupSize property depends on your host machine hardware.

Property Type Description
MaxGroupSize Number Max devices count per thread for monitoring
DefaultPingInterval String Default device stats collection interval
ProbeTimeout String IP address probe timeout during scan
ConnectTimeout String ASIC connect timeout