Welome to the 2nd part of mining monitoring tutorial series. In this article you will get to know about how to get email notification if your mining rig goes down. We all know the frustration when we realize that our mining rig is not mining since x time. We manually cannot monitor the rig all of the time so some automated monitoring solution is needed.
Powershell script which I have provided below will rescue you in that case. If your rig crashes anytime or mining pool is down then you will be alerted via email regarding its crash. Thus saving your precious time in deciding what to do next ,after crash. Logging in via team viewer is one of the option.
- 0.1 Prerequisite : Must check Part 1 on this tutorial series : How to automatically restart miner after crash
- 1 Configuring Outlook For Gmail Account
- 2 How to get Email Notification after Miner Failure
Prerequisite : Must check Part 1 on this tutorial series : How to automatically restart miner after crash
After Part 2 Follow :
Part 3 : Automatically Connect to Different Internet Connection if one goes down (coming Soon)
Part 4 : What if the whole system hangs up (coming soon)
Configuring Outlook For Gmail Account
For this script you need to have desktop email client – outlook and a Gmail account.
- Outlook comes prebundled with MS Office.
Configuring Gmail for IMAP
- Login to your Gmail account ( on which you want to receive email notification )
- On top right-click on gear icon >> Settings >>Forwarding and POP/IMAP.
- in “IMAP Access: ” choose Enable IMAP.
- Click on Save Changes
How to Set App Password in Gmail
- After login to Gmail, click on your profile picture >> My Account >>Sign-in & security.
- Scroll down and in “Signing in to Google” tab click on App Password.
- In “Select app” choose “mail” and in “Select device” choose “Windows Computer”.
- Click on “Generate” and save the generated password for later use.
How to Configure Outlook for Gmail Account
- Start outlook
- Click File >> Account Settings >> New
- Click “Next” and select “Yes” >>”Next”
- On next screen choose “Manual setup” >> “Next”
- Choose “POP or IMAP” >> “Next”
- In “Add Account” enter the following information
Your name: Enter your name
Email address: Email your Gmail Address
Account type: IMAP
Incoming mail server: imap.Gmail.com
Outgoing mail server (SMTP): smtp.Gmail.com
User name: Your Gmail Address
Password: Enter password which you got in step 4 of “How to Set App Password in Gmail”
- Click on “More Settings” >> “Outgoing Server” >> ” Outgoing Server (SMTP) requires authentication”
- Click on “Advance” tab and edit as shown in picture.
Encryption type “SSL” in both.
IMAP : 993
SMTP : 465
- Click “OK” >> “Next”.
- Outlook will test the connection, click close if test result is successful otherwise check entered details.
How to get Email Notification after Miner Failure
- Download script package Part 1 + Part 2.
- Configure as per Part 1 of this tutorial series.
- Following powershell code is added to Part 1 to make Part 2.
12345678910#Enter mail id on which you want to receive notification$EnterYourEmailID = "[email protected]"$Outlook = New-Object -ComObject Outlook.Application$Mail = $Outlook.CreateItem(0)$Mail.To = $EnterYourEmailID$Mail.Subject = "Miner Down"$Mail.Body ="... Resetting Mininig Software `n `n For Mining Guides, Crypto News and Crypto Related Stuff Visit http://jkcrypto.com/ "$Mail.Send()
- Considering you have already made changes as per “Part 1”. Now change “[email protected]” with email id on which you want to receive notification.
- Done, Part 2 “Email Notification if Mining Stopped” is complete.
Receiving Notification on Smartphone
Although you will receive email notification on your smartphone regarding “miner down”.If you don’t want to get notified via Gmail mobile app then you can do the following to receive instant notification on your smartphone.
1. Visit this link
2. Get Started >> Login with your google account >> Turn on the applet.
3. Give permission to ifttt
4. Turn on notification and enter your email id.
6. Install and login with your Gmail account.
7. That’s it, you will receive notification on smartphone if mining stopped.
I have made this mining monitoring tutorial as easy as possible. If you are still facing any issues don’t hesitate to ask via comments below. To appreciate my work you can give this article a share.