Zabbix Notifications


It all started when my Plex Media Server/Playground box (a little NUC8i3BEK) started having some not so good fan noises emanating from it. I ordered a new fan on Amazon to replace it and go fucking figure the fan noises stop when the new replacement fan arrived. So I shelved the new part, I still have it because I am sure I will need it eventually but for now the original is working fine but I don’t trust it and this leads me finally to my point. I needed a way to monitor my CPU temperatures AND send me a notification. There are a ton of ways to see your CPU temperature but not a whole lot of ways to be notified when they hit certain thresholds. Hello Zabbix!

This took me my entire night to get done, so it shouldn’t for you. You’re welcome.

After Googling for a bit I came across an AskUbuntu Question that sent me in the direction of Zabbix. I’ll drop the link to the question so you can see the other options available similar to Zabbix. I went through the list and settled on Zabbix it seemed to fit the bill for what I wanted.

If you go to their downloads page there is a handy chart with step-by-step directions on how to install Zabbix on your system. I went with v6.4 – Ubuntu – 22.04 – Server, frontend, Agent – MySQL – Nginx. I will list those steps here for Zabbix on Ubuntu with Nginx, if you have a different system OS or Apache you should check out the download page for install directions.

View Post

OctoPrint and Email Notifier woes

Email Notifier Woes

Update 3-22-19: It appears that the plugin is broken, dead, and abandoned by its creator. I currently know of no other way to send notifications besides Twilio or IFTTT.

I have OctoPrint (via OctoPi) setup and I wanted a way to be notified when my print was done without constantly walking into the garage. So I searched the plugins one day and found the Email Notifier.

After I installed it I could not get it to work for the life of me. I followed the instructions of adding my username and password to the keyring but it always produced an error NameError: global name ‘keyring’ is not defined”. Tried some fixes here and there but nothing had worked. So I bailed.

I tried to install the SMS Notifier (Twilio) instead, and that seems to have broken my plugin installation manager. Great. Now whenever I try to install a plugin after I tried to install the SMS Notifier I get the error message about pip not understanding the output or some shit. Great. I have flashed an SD card 2x and tried this twice, it always causes this issue. Damn you SMS Notifier. I have not looked at their Github for a fix yet, so… (Update: it did not break my plugin manager, that was another issue.)

I went back to the Email Notifier, and this time I got it working. I spent some more time digging on the net and found the solution to the issue I had of the keyring not defined. Then… I ran into a different error of yagmail not wanting to send mail via Google because of some reason (it didn’t say exactly) just gave me the generic error code of “send-mail: Authorization failed 534 5.7.14”. Looking that up had no help. But… I did find the answers to my problems and now my Email Notifier is up and running!

I get the error message of there being a new pip version but I have ignored this so far. These are the steps I took to get it working, YMMV.

First make sure that your Google account is setup to allow less secure sign-ins.

Then SSH into your OctoPrint and update yagmail then install keyring.

Install yagmail (its probably already installed but hey)
/home/pi/oprint/bin/pip install yagmail[all] --upgrade /home/pi/oprint/bin/pip install keyring --no-deps

Start OctoPrint Python


(control+z to exit)

Reboot the Raspberry Pi for all the changes to take effect. I tried just restarting OctoPrint but that didn’t work. After the reboot I ran into another issue (of course).

“sending failed. Reason :: send() got an unexpected keyword argument “validate_email”

Modify the file (__init.py__ is how it showed on my system with ls ) found in /home/pi/oprint/lib/python2.7/site-packages/octoprint_emailnotifier and change the line:
mailer.send(to=emails, subject=subject, contents=body, validate_email=False)

mailer.send(to=emails, subject=subject, contents=body)

(here is the fix

Places I found my answers: