This article covers the custom rules and triggering functionality of Foreman, which provides users with a mechanism to automatically perform actions based on various criteria.
Foreman will notify you and your team immediately as problems arise, enabling on-site operators to respond quickly. Sometimes, however, the solution can be as simple as rebooting the device, which Foreman can do for you.
Triggers
A trigger is a source of an event that's tied to an action (when something happens to these miners, do this). When you create a trigger, you select the miners that it applies to - here are a few of the conditions that can fire:
- Health: a miner has transitioned to a 'failing' or 'warning' status
- Hash Rate: a miner's hash rate has fallen too low
- Temperature: a temperature sensor is too high
- Fan speed: a fan speed is either too high or too low
- No Submitted Shares: no shares are being submitted to the pool
- Not Updating: a miner has gone offline
- Rebooted: a miner has rebooted
- Hardware Errors: a miner is indicating that it has hardware errors
- Time Interval: run an action every X minutes
- Minute of Hour: run an action X minutes from the start of every hour
- Minute of Day: run an action X minutes after midnight
- Raw Metrics: a custom defined trigger based on raw metrics from the miner
Actions
Here are a few of the actions that can be performed in response to a trigger:
- Send Alert: receive an email notification indicating what's happening
- Reboot: reboot the miner that triggered the event
- Change Pools: change the miner's pools to a user-provided configuration
Here are a couple of common ways that these are used:
Send a Notification when there's a Problem
This is actually created for you by default:
With Change selected, you will receive notifications any time a miner's status changes to fail. Without it, you will only be notified for the first failure and all other notifications will be suppressed until the first is resolved.
Automatically Reboot on ASIC Failures
To automatically reboot an ASIC after hardware errors are reported for 10 consecutive minutes:
Automatically Reboot when Not Hashing:
Ultimately, not hashing can be defined as the miner being offline, not reporting a hash rate, or not sending shares. For all of the above, no shares are being submitted, so we'll only need 1 trigger to catch this. Here's how you'd make it automatically reboot after 20 minutes:
Automatically Reboot Miners every Night:
Here's an example to automatically reboot Avalon 1047s at midnight:
Split Hash Rate Between Pools
Assuming you had multiple sites, and wanted to split your hash rate between different pools, here's how to do that for the following distribution:
- 30% to SlushPool (432 minutes of the day)
- 30% to ViaBTC (432 minutes of the day)
- 40% to AntPool (576 minutes of the day)
Comments
0 comments
Article is closed for comments.