Rules

Awesome Miner uses rules to define actions to be performed when a certain condition (trigger) is met. There are two kind of rules:
  • Predefined rules: These rules are included in Awesome Miner and cannot be removed, only disabled. The actions of a predefined rule can be modified, but only limited changes to the triggers are allowed.
  • User defined rules: These rules are defined by the user of Awesome Miner and both triggers and actions can be fully configured.
The configuration of rules are performed in the Options dialog, Rules section, illustrated below. Awesome Miner rules

Configure a rule

This section describes the settings that can be configured for a specific rule.

A rule consists of one or more triggers and one or more actions. If the conditions of the triggers are met, all the defined actions will be performed.

The rule configuration dialog where triggers and actions can be configured are displayed below.

Awesome Miner rule configuration

Settings

Configuration of the name of the rule and selection of which miners the rule should apply to.

Triggers

Configuration of triggers for the rule. One or more triggers can be added.

These are the supported trigger types:
  • Check statistics: Trigger on miner statistics like accepted, rejected and HW errors
  • Offline detection: Trigger if a miner goes offline
  • Detect dead/sick devices: Trigger if a device (for example a GPU) is either sick or dead.
  • Detect found blocks: Trigger if a block is found during mining
  • Detect pool: Trigger if a pool is either present or missing
  • Device temperature: Trigger if the temperature of a device (for example a GPU) is either too high or too low
  • Device count: Trigger if the number of devices (for example GPU's) is too low
  • Fan speed: Trigger if the GPU fan speed is too low
  • Time: Trigger on a specific time, day or on a regular interval
  • Ping: Trigger if a ping response was received or not
  • Detect miner API connection established: Trigger when the API connection to a miner is established
  • C# Script: Develop a custom C# script to define a trigger. For advanced users only

If Match all is selected, the conditions for all triggers must be met to trigger the actions. If Match at least one is selected, only the conditions for at least one trigger must be met.

Actions

These are the supported actions types:
  • Create notification: Creates an information or warning notification. If the notification configuration is set to display desktop notifications and/or send e-mail messages, these actions will also be performed
  • Send e-mail: Send an e-mail message
  • Send SMS: Send a SMS message (requires Cloud Services subscription)
  • Send webhook request: Send a HTTP request to an external service
  • Run executable: Run an external application or command
  • Miner command: Send a command to the miner(s), for example to start, stop, restart, reboot computer or to change pool
  • Device command: Send a command to the miner(s) to change device settings, for example to enable or disable a GPU or ASIC device or to change GPU speed
  • SSH command: Send SSH commands to either the miner(s) or to any other computer with SSH enabled
  • Antminer, Set frequency: Change Antminer frequency
  • Antminer, Set default pools: Set the three default pools for Antminers, used when the Antminer reverts back the pool settings
  • Highlight miner: The miner will be highlighted with a color in the Miners tab in the Awesome Miner main window
  • Wait: Wait a specified number of seconds before the next action is executed
  • Run profit switching: Manually trigger the profit switcher to run
  • C# Script: Develop a custom C# script that will be executed

Support manual activation: Instead of, or in addition to, the defined triggers, this features allows a rule to be triggered manually. When enabled, a button with all the rules supporting manual activation will be displayed in the toolbar of the Awesome Miner main window. The toolbar button name is Actions and will expand a sub menu with all available rules.

Example: Show notification on low hashrate, and optionally reboot

The screenshot below shows an example of a Check statistics trigger that is configured to check if the current hash rate is less than (or equal) to 9 TH/s.

Awesome Miner cgminer statistics

The screenshot below shows an example of a Create notification action that is configured to display an information message.

Awesome Miner action

When checking for low hashrates, it's often better to check not only the current, but also the hashrate a couple of minutes ago. This is to reduce the number of false alarms where the hashrate for a very short period of time is dropping. The example below will both look at the current hashrate and on the hashrate 5 minutes ago. If both are lower than the limit, the actions will be triggered. Note that Match all must be selected to get this behavior.

This rule can also be extended with more actions in addition to the notification listed below. Additional actions could be to either reboot a computer or to reboot an Antminer.

Rule specification:
  • Description: Monitor hashrate 9 TH/s limit
  • Triggers: Match all
  • Trigger: Check statistics
    • Property: Hashrate, Current
    • Compare operation: Less than or equals
    • Compare value with 9000000000
  • Trigger: Check statistics
    • Property: Hashrate, 5 minutes ago
    • Compare operation: Less than or equals
    • Compare value with 9000000000
  • Action: Notification
    • Message: The hashrate is below 9 TH/s
Extend rule with reboot for ASIC mining (for example with Antminers)

Add an additional action to reboot the miner

  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system
Extend rule with reboot for GPU mining

Add an additional action to reboot the computer (when Remote Agent is used)

  • Action: Miner command (Optional and only for GPU mining)
    • Command: Reboot computer

Example: Mining only when the computer is idle

Rule specification:
  • Description: Start mining when idle
  • Trigger: Computer idle
    • Trigger on: Computer is idle
  • Action: Miner command
    • Command: Start miner
Rule specification:
  • Description: Stop mining when used
  • Trigger: Computer idle
    • Trigger on: Computer is used
  • Action: Miner command
    • Command: Stop miner

Example: Launch Remote Desktop for selected Managed Miner

This example illustrates the "Manual activation" feature that can be enabled for rules. When enabled, the rule will be displayed in the Actions menu in the main window of Awesome Miner when a miner is selected. The command can be changed to launch other applications and services as well. The [Host] parameter will be replaced with the hostname/IP of the selected miner.
Rule specification:
  • Description: Launch Remote Desktop
  • Action: Run executable
    • Executable: mstsc.exe
    • Parameters: /v:[Host]
  • Support manual activation: Yes (checked)

Example: Reboot an Antminer on chip failures

Antminers can report chip failures and these are displayed on the ASIC tab when selecting an Antminer in Awesome Miner. This is indicated as 'o' for a working chip and 'x' for a failed chip. This example describes how to create a rule that reboots Antminers with two or more chip failures.
Rule specification:
  • Description: Reboot Antminer on chip failure
  • Detect dead/sick device
    • Enable: Antminer chip failure, threashold: 2
  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system

Example: Reboot Antminers via a button click

This example also illustrates the "Manual activation" feature that can be enabled for rules. When enabled, the rule will be displayed in the Actions menu in the main window of Awesome Miner when a miner is selected. Once the rule is defined, it can be executed by selecting one or many Antminers in the main window, and using the Action menu, Reboot Antminer command.
Rule specification:
  • Description: Reboot Antminer
  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system
  • Support manual activation: Yes (checked)

Example: Shutdown remote PC via a button click

This example also illustrates the "Manual activation" feature that can be enabled for rules. When enabled, the rule will be displayed in the Actions menu in the main window of Awesome Miner when a miner is selected. Once the rule is defined, it can be executed by selecting one or many Managed Miners in the main window, and using the Action menu, Shutdown command.
Rule specification:
  • Description: Shutdown
  • Action: Miner command
    • Command: Execute remote command
    • Command: shutdown.exe
    • Parameters: /s
  • Support manual activation: Yes (checked)

Example: Stop mining on high device temperature

If the temperature of a GPU becomes higher than 92 °C, this rule will stop the mining and send a notification message
Rule specification:
  • Description: Overheat protection
  • Trigger: Detect temperature
    • Temperature: 92 °C
  • Action: Miner command
    • Command: Stop miner
  • Action: Notification
    • Message: Stopping mining because of high temperature

Example: Reboot a GPU miner every 12 hours

In case a GPU miner becomes unstable after a longer period of operation, this rule can reboot the miner every 12 hours.
Rule specification:
  • Description: Reboot every 12h
  • Trigger: Time
    • Trigger every: Hour: 12
  • Action: Miner command
    • Command: Reboot computer
Back to help section