-
Notifications
You must be signed in to change notification settings - Fork 69
ChiaDog
ChiaDog provides farm monitoring and alerts. ChiaDog allows users to setup and configure advanced alerting on a large variety of platforms such as Discord, Telegram, Slack, and more, through the use of Webhooks and other APIs. Machinaris uses a fork of Chiadog with enhancements.
NOTICE: As of mid-2023 with the release of Chia 2.0 requiring binary deployment for GPU-support of farming, the workaround for Chiadog alerting when your farm successfully wins a block, no longer works. So don't expect an Alert, however the block win will appear on the main Machinaris page (look for Mario...) the following day.
As shown above, notifications are also shown in the Machinaris WebUI, on the Alerts page.
To configure ChiaDog within Machinaris, please select the "Alerts" tab under the "Settings" button on the left side panel.
Enabled by default for each full-node and harvester, you may choose to disable Chiadog by editing the line enable
line and clicking Save:
...
chia_logs:
file_log_consumer:
enable: false
...
You can then Remove All from the Alerts page. It may take a while for all past Alerts to stay purged. Please be patient!
Each integration is described below. For more details, see the Chiadog project.
Pushover is a service that allows you to have Push Notifications sent directly to your phone, to learn more, see their website here.
Please Note, Pushover is a Paid Subscription
To get Pushover to work with ChiaDog, simply get your API Token & Key, and add them to the config, and set Enable to True;
pushover:
enable: true
daily_stats: true
wallet_events: true
credentials:
api_token: 'Your_API_Token'
user_key: 'Your_API_Key'
Don't delete the ' marks
To use Telegram notifications, you will need to create a Telegram Bot, please see Telegram's documentation on this here.
You will also need the Chat ID of the chat in which you would like your Telegram Bot to post Alerts, get the Chat ID by following instructions here.
Finally, set Enable to True, and insert your Bot's API Token and the Chat ID;
telegram:
enable: true
daily_stats: true
wallet_events: true
credentials:
bot_token: 'Your_API_Token'
chat_id: 'Your_Chat_ID'
Don't delete the ' marks
ChiaDog is able to send Email Alerts, but this will require an Email Account and information about your Email's SMTP Server.
Below is a table of the most commonly used email services, their documentation on their SMTP Servers, and their general info.
Service Documentation | SMTP Server | Supported Ports | Encryption |
---|---|---|---|
Google Gmail | smtp-relay.gmail.com |
25, 465, or 587 | SSL/TLS |
Outlook Mail | smtp-mail.outlook.com |
993 | STARTTLS |
iCloud Mail | imap.mail.me.com |
587 | SSL/TLS |
- Set Enable to True
- Set Sender Address and Name.
This can be anything. - Set Recipient Address.
This can be any valid address you wish to use. - Enter your account's username and password
If you have Two Factor Authentication On, please see your service's documentation before proceeding. - Set Host to your service's SMTP Server
- Set Port to your service's SMTP Port
smtp:
enable: true
daily_stats: true
wallet_events: true
credentials:
sender: '[email protected]'
sender_name: 'chiadog'
recipient: '[email protected]'
username_smtp: 'username'
password_smtp: 'password'
host: 'smtp.example.com'
port: 587
Don't delete the ' marks
Integrating ChiaDog to your Discord Server is extremely easy, all you need is a Webhook URL. See instructions here.
Set Enable to True, and enter your Webhook URL.
discord:
enable: true
daily_stats: true
wallet_events: true
credentials:
webhook_url: 'https://discord.com/api/webhooks/...'
Don't delete the ' marks
Similarly to Discord, Slack only requires a Webhook URL to function, however it's a few more steps to get this setup. See Slack's documentation here.
Set Enable to True, and enter your Webhook URL.
slack:
enable: true
daily_stats: true
wallet_events: true
credentials:
webhook_url: 'https://hooks.slack.com/services/...'
Don't delete the ' marks
ChiaDog is able to communicate with MQTT / Internet of Things Integrations, it specifically uses Paho-Mqtt, with documentation found here.
mqtt:
enable: false
daily_stats: true
wallet_events: true
topic: chia/chiadog/alert
qos: 1
retain: false
credentials:
host: '192.168.0.10'
port: 8883
username: ''
password: ''
Don't delete the ' marks
Getting too many alerts from Chiadog? This enhanced version offers a setting to either an allow (to selectively include) or ignore (to selectively exclude). This allow
or ignore
are optionally applied to a particular notifier, as set in the Chiadog config file, available from the Settings | Alerts page of the Machinaris WebUI, for each Workers.
For example, to only skip LOW priority alerts spamming Discord, you could edit the Settings | Alert page for a specific worker & blockchain as follows:
discord:
enable: false
daily_stats: true
wallet_events: true
credentials:
webhook_url: 'https://discord.com/api/webhooks/...'
ignore:
priority: 'low'
The standard ignore clause should have one of priority
(low, normal, high), service
(full_node, harvester, farmer, daily, wallet), type
(user, daily_stats, plotincrease, plotdecrease), or message
which is a substring search on the alert text itself.
If you want to join ignore clauses together, use a json-logic rule as value (in single quotes) to the compound
keyword. Example:
discord:
enable: false
daily_stats: true
wallet_events: true
credentials:
webhook_url: 'https://discord.com/api/webhooks/...'
ignore:
compound: '{"or": [ { "==": [ {"var": "priority"}, "low" ] }, { "==": [ {"var": "priority"}, "normal" ]} ]}'
The vars available are priority
, service
, type
, and message
. The compound
statement syntax of json-logic can be a little tricky so test it out first.
- Example Rule:
{"or": [ { "==": [ {"var": "priority"}, "low" ] }, { "==": [ {"var": "priority"}, "normal" ]} ]}
- Example Data:
{ "type" : "userx", "priority" : "low", "service" : "full_node", "message" : "Hello World" }
- Example Result: true -> Indicates that the alert would be ignored for a notifier as matches "priority==low".
If Chiadog is spamming multiple repeated alerts, it may be chewing on corrupted logs. Here's how to remove the blockchain and chiadog logs
1) Stop Machinaris-Flax container.
2) Delete ~/.machinaris-flax/flax/mainnet/log/*
3) Delete ~/.machinaris-flax/chiadog/logs/*
4) Start Machinaris-Flax container up again.
Change to the particular container name like .machinaris, .machinaris-flora, etc
Due to logging changes upstream by the Chia Network Inc (CNI) developers, Chiadog can no longer track wallet additions without switching to the very verbose DEBUG logging level. Suggestions to address this problem with Chia logging were rejected by CNI.
The workaround for this unforunate situation with the defunct Chiadog project, might be worked around by switching to the DEBUG log level. This can be done on the Settings | Farming page of Machinaris, choose your fullnode worker and the 'Chia' blockchain. Then search for:
log_level: INFO
and change it to log_level: DEBUG
, then hit the Save button. NOTE, on save the Chia blockchain services will be restarted with this more verbose logging enabled.
CHIA NETWORK INC, CHIA™, the CHIA BLOCKCHAIN™, the CHIA PROTOCOL™, CHIALISP™ and the “leaf Logo” (including the leaf logo alone when it refers to or indicates Chia), are trademarks or registered trademarks of Chia Network, Inc., a Delaware corporation. There is no affiliation between the Machinaris project and the main Chia Network project.