Skip to content

irbujam/ss_log_event_monitor

Repository files navigation

Autonomys monitoring powershell script

A simple to run and lightweight windows powershell script that captures live information using prometheus metrics endpoint. To launch the monitor save all files with extension *.ps1 and sample-config.txt file in the same folder on a local computer, copy contents of sample-config.txt to a new file and name it config.txt. Adjust config to your needs and run subspace_advanced_CLI_monitor.ps1 file. Ensure that you have read the pre-requisites below.

Note: If you recently restarted Farmer please wait for few minutes and the metrics will show eventually

Pre-requisites:

  • Must use latest advanced CLI release
  • Powershell version 5.1 is installed
  • Add --prometheus-listen-on [node-local-ip:port] to node start-up script
  • Add --prometheus-listen-on [farmer-local-ip:port] to farmer start-up script
  • Add command line options -m and -n to nats-server start-up script (example: nats-server -n my-nats-server1 -m 18080 -c nats.config)
  • Change node/farmer settings in the config.txt file so that the ip:port are matching to the values set for --prometheus-listen-on your node and farmer
  • Change nats-server settings in the config.txt file so that the ip matches to the computer running nats-server and port matches to as in nats-server start-up script

To enable web access, do the following:

  • Ensure to create an inbound rule under windows defender firewall for http listening port as specified in the config file. This must be done on the computer that hosts ps1 script
  • Must run the ps1 file as admin in powershell console
  • The endpoint to use is http://ip:port/summary

Key features:

  • monitoring support for cluster set-up

  • Multi component (remote or local) location and multi OS supported for monitoring

  • Web service enabled to view stats using a web browser on phone/ pc or as a second screen to legacy monitor console display

  • Monitor script can run independently on a pc separate from cluster/farms/nodes hosted pc

  • Run-time changes to config.txt reflected in minitor (only works with web ui disabled in config)

  • No need for log files as monitoring is now using metrics endpoints

  • discord and telegram alert notifications

  • Summary and detail stats view configurable (and sticks) at start-up

  • Local Time Zone display

*** For questions and feedback please contact (rs_00) in autonomys discord channel.