Skip to content

Xiamon - a chia/ sia/ storj rig monitor

License

Notifications You must be signed in to change notification settings

danielringch/xiamon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xiamon - a chia/ sia/ storj rig monitor

Xiamon is a multi-purpose computer monitoring software for running storage based web3 and crypto services, such as chia, sia and storj.

The focus of the software is to minimize the necessary effort to keep your rig running - no fancy diagrams, no customizable dashboard, but realtime notifications if something is fishy.

Tax reporting is also a big feature of Xiamon. Thanks to logfiles and csv exports, it is easy to keep track of the revenues of the individual services.

The whole software is configured as a combination of plugins and outputs, providing great flexibility.

Prerequisites

  • Python version 3.8 or newer with pip + venv

The hardware related plugins will only work on linux. All other should run on any OS, but I have no capacity to test this, so feedback is appreciated. My test machines run Ubuntu and Raspbian.

Plugings

  • Chia
    • chiaharvester: Chia harvester monitoring using the chia API. Checks for problems with the plot files.
    • chiafarmer: Chia farmer monitoring using the chia API. Checks for missed signage points.
    • chianode: Chia full node monitoring using the chia API. Checks that the node stays synced and gives information about connected peers.
    • chiawallet: Chia (lite) wallet monitoring using the chia API. Tracks the wallet balance and balance changes.
    • spacefarmers: pool monitoring for spacefarmers.io. Tracks the open balance, partials and worker status.
  • Sia
    • hostd: Sia host monitoring using the hostd API. Includes wallet tracking, storage and traffic statistics, automatic price updates and financial reporting.
    • siahost: Sia host monitoring using the sia API. Includes wallet tracking, storage and traffic statistics, automatic price updates and financial reporting.
  • Storj
    • storjnode: Storj node monitoring using the storj API. Includes storage and traffic statistics and financial reporting.
  • Drive management
    • diskfree: Disk free space monitoring.
    • pingdrive: Supervises disk activity and pings drives if too inactive. Prevents head parking and sends alerts in case of drives going offline.
    • smartctl: Checks drive health using S.M.A.R.T. and provides some logging.
  • Energy management
    • opendtu: Solar farm monitoring for Hoymiles inverters and openDTU.
  • General
    • eccram: Checks the error statistics of ECC RAM.
    • messagerelay: Relays messages received via http post request to the interfaces.
    • mqttlogger: Logs data from MQTT topics.
    • sysmonitor: Checks basic system health, such as load, RAM, swap and temperatures.
    • serviceping: Pings chia, sia and storj using their APIs. Usefull to check from another machine that your service is online.

Outputs

Xiamon communicates via outputs. Messages are routed through different message channels, depending on their content:

  • Alert: Something unusal happened. It is a good idea to configure Xiamon to send messages from this channel to an output giving you instant messages.

  • Info: Some short summaries and statistics. Nothing urgent.

  • Verbose: Similar to the info channel, but more verbose. Works best with log files.

  • Accounting: Summaries and statistics related to financial reporting. It is usually worth to archive messages from this channel in log files.

  • Error: Something is wrong with the tool. Either your configuration file contains a mistake our you found a bug.

  • Debug: Some verbose outputs. Most are only relevant for debugging.

The following outputs are available:

More outputs can be added easily in the future.

Usage

  1. Activate virtual environment:
source <path to virtual environment>/bin/activate
  1. Run Xiamon:
python3 xiamon/xiamon.py --config <path to main config file> 

Installation

  1. Clone this repository:
git clone https://github.com/danielringch/xiamon.git
  1. Copy the config directory to a place of your choice.
  2. Adapt the copied config files.
  3. Create a python venv and install dependencies:
python3 -m venv <path to virtual environment>
source <path to virtual environment>/bin/activate
python3 -m pip install -r requirements.txt

Using Docker

  1. Create an empty directory for the configuration.
  2. Get the image:
docker pull danielringch/xiamon:latest
  1. Create the container:
docker create -v <directory for configuration>:/userconfig --name xiamon danielringch/xiamon:latest
  1. Run Xiamon. Since the configuration directory is emtpy, it will copy the configuration templates and quit.
docker start -i xiamon
  1. Adapt the copied config files.
  2. Run Xiamon.

Configuration

The configuration is done via yaml files. One main yaml file contains global settings, the used plugins/ outputs and their configuration files. Every instance of a plugin has its own configuration file.

Further documentation can be found here; the documentation of the plugin/ output configuration files can be found in the documentation of the individual plugins/ outputs. There are also template configuration files for every plugin/ interface available.

Get support

You have trouble getting started with Xiamon? Something does not work as expected? You have some suggestions or thoughts? Please let me know.

I have chosen reddit as main communication platform for this project, so please visit r/xiamon . You can also DM me: 3lr1ng0.

Feel also free to open an issue here on github.

Contributing

If you would like to contribute, please read CONTRIBUTING.md.